mirror of https://github.com/panjf2000/ants.git
bug: fix the missing log.Lmsgprefix in go1.13 (#275)
Fixes #274 --------- Co-authored-by: Andy Pan <panjf2000@gmail.com>
This commit is contained in:
parent
b32591f8bd
commit
bca5b3a7d6
|
@ -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
|
||||
|
|
4
ants.go
4
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)
|
||||
|
|
Loading…
Reference in New Issue