diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ff8fef..35b5a8a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: '^1.13' + go-version: ${{ matrix.go }} - name: Print Go environment id: go-env diff --git a/ants.go b/ants.go index 6205cde..18b3dc8 100644 --- a/ants.go +++ b/ants.go @@ -82,7 +82,9 @@ var ( return 1 }() - defaultLogger = Logger(log.New(os.Stderr, "[ants]: ", log.LstdFlags|log.Lmsgprefix|log.Lmicroseconds)) + // log.Lmsgprefix is not available in go1.13, just make an identical value for it. + logLmsgprefix = 64 + defaultLogger = Logger(log.New(os.Stderr, "[ants]: ", log.LstdFlags|logLmsgprefix|log.Lmicroseconds)) // Init an instance pool when importing ants. defaultAntsPool, _ = NewPool(DefaultAntsPoolSize)