From a6344e317e4fcebac04c861ed61d4f197bebc805 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Thu, 4 Aug 2022 23:52:52 +0200 Subject: [PATCH] chore: Go 1.19 Signed-off-by: Valery Piashchynski --- .github/workflows/linters.yml | 6 +++--- .github/workflows/tests.yml | 2 +- .golangci.yml | 1 + socket_darwin.go | 1 - socket_other.go | 1 - tcplisten.go | 1 - tcplisten_bsd.go | 1 - tcplisten_linux.go | 4 +--- 8 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 71a53fd..754255f 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -10,14 +10,14 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Set up Go 1.18 + - name: Set up Go 1.19 uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Run linter uses: golangci/golangci-lint-action@v3.2.0 # Action page: with: - version: v1.47 # without patch version + version: v1.48 # without patch version only-new-issues: false # show only new issues if it's a pull request args: --timeout=10m diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9263740..603b4db 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: true matrix: - go: ["1.18"] + go: ["1.19"] os: ["ubuntu-latest", "macos-latest"] steps: - name: Set up Go ${{ matrix.go }} diff --git a/.golangci.yml b/.golangci.yml index f623ed7..03e55a1 100755 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,7 @@ # Documentation: run: + go: '1.17' timeout: 1m skip-dirs: - .github diff --git a/socket_darwin.go b/socket_darwin.go index e53ce53..10660c0 100644 --- a/socket_darwin.go +++ b/socket_darwin.go @@ -1,5 +1,4 @@ //go:build darwin -// +build darwin package tcplisten diff --git a/socket_other.go b/socket_other.go index 61a9dce..30248bd 100644 --- a/socket_other.go +++ b/socket_other.go @@ -1,5 +1,4 @@ //go:build !darwin -// +build !darwin package tcplisten diff --git a/tcplisten.go b/tcplisten.go index 3577600..5477472 100644 --- a/tcplisten.go +++ b/tcplisten.go @@ -1,5 +1,4 @@ //go:build linux || darwin || dragonfly || freebsd || netbsd || openbsd || rumprun -// +build linux darwin dragonfly freebsd netbsd openbsd rumprun // Package tcplisten provides customizable TCP net.Listener with various // performance-related options: diff --git a/tcplisten_bsd.go b/tcplisten_bsd.go index c1c0a57..aa75267 100644 --- a/tcplisten_bsd.go +++ b/tcplisten_bsd.go @@ -1,5 +1,4 @@ //go:build darwin || dragonfly || freebsd || netbsd || openbsd || rumprun -// +build darwin dragonfly freebsd netbsd openbsd rumprun package tcplisten diff --git a/tcplisten_linux.go b/tcplisten_linux.go index 7942009..3297ce5 100644 --- a/tcplisten_linux.go +++ b/tcplisten_linux.go @@ -1,11 +1,9 @@ //go:build linux -// +build linux package tcplisten import ( "fmt" - "io/ioutil" "os" "strconv" "strings" @@ -34,7 +32,7 @@ func enableFastOpen(fd int) error { const fastOpenQlen = 16 * 1024 func soMaxConn() (int, error) { - data, err := ioutil.ReadFile(soMaxConnFilePath) + data, err := os.ReadFile(soMaxConnFilePath) if err != nil { // This error may trigger on travis build. Just use SOMAXCONN if os.IsNotExist(err) {