diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e0448a8d..bcdc4103 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.18" + go-version: "1.23" - name: Build run: go build -v ./... @@ -31,7 +31,7 @@ jobs: - uses: dominikh/staticcheck-action@v1.3.1 with: - version: "2022.1.3" + version: "2024.1.1" install-go: false cross-compile: @@ -44,7 +44,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.18" + go-version: "1.23" - name: Cross-compile on all supported platforms run: gen/xbuild.sh @@ -59,7 +59,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.18" + go-version: "1.23" - name: Test `go fmt` creates no diffs run: go fmt && git diff --exit-code diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b60cb63..be4ced7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "1.18" + go-version: "1.23" - name: Build run: gen/xbuild.sh diff --git a/go.mod b/go.mod index 9ef5c20b..3a2c18ad 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gokcehan/lf -go 1.18 +go 1.23 require ( github.com/Xuanwo/go-locale v1.1.2 diff --git a/misc.go b/misc.go index 85e735ed..be6e2e4a 100644 --- a/misc.go +++ b/misc.go @@ -335,22 +335,6 @@ var ( reWordEnd = regexp.MustCompile(`(\pL|\pN)([^\pL\pN]|$)`) ) -// TODO: Remove when bumping to Go 1.21+ -func min(a, b int) int { - if a < b { - return a - } - return b -} - -// TODO: Remove when bumping to Go 1.21+ -func max(a, b int) int { - if a > b { - return a - } - return b -} - // This function parses given locale string into language tag value. Passing empty // string as locale means reading locale value from environment. func getLocaleTag(localeStr string) (language.Tag, error) {