From df029e6411dd08a0ef91c94ae397badf2c64d9b7 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Wed, 11 Dec 2024 21:31:38 +0800 Subject: [PATCH] opt: bump up the minimum required Go version to 1.16 --- .github/workflows/test.yml | 16 +--------------- ants.go | 4 +--- go.mod | 2 +- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c860cc..c4989a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,22 +55,8 @@ jobs: strategy: fail-fast: false matrix: - go: [1.13, 1.23] + go: [1.16, 1.23] os: [ubuntu-latest, macos-latest, windows-latest] - include: - # TODO(panjf2000): There is an uncanny issue arising when downloading - # go modules on macOS 13 for Go1.13. So we use macOS 12 for now, - # but try to figure it out and use macOS once it's resolved. - # https://github.com/panjf2000/ants/actions/runs/9546726268/job/26310385582 - - go: 1.13 - os: macos-12 - exclude: - # Starting macOS 14 GitHub Actions runners are arm-based, - # but Go didn't support arm64 until 1.16. Thus, we must - # replace the macOS 14 runner with macOS 12 runner for Go 1.13. - # Ref: https://github.com/actions/runner-images/issues/9741 - - go: 1.13 - os: macos-latest name: Go ${{ matrix.go }} @ ${{ matrix.os }} runs-on: ${{ matrix.os}} steps: diff --git a/ants.go b/ants.go index 4b61ba2..dd170a6 100644 --- a/ants.go +++ b/ants.go @@ -88,9 +88,7 @@ var ( return 1 }() - // 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)) + defaultLogger = Logger(log.New(os.Stderr, "[ants]: ", log.LstdFlags|log.Lmsgprefix|log.Lmicroseconds)) // Init an instance pool when importing ants. defaultAntsPool, _ = NewPool(DefaultAntsPoolSize) diff --git a/go.mod b/go.mod index af3906b..2e75d8f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/panjf2000/ants/v2 -go 1.13 +go 1.16 require ( github.com/stretchr/testify v1.8.2