diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcabe65..1ecc689 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.24' - name: Test env: GOOS: ${{ matrix.goos }} @@ -29,9 +29,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.24' - name: Race Condition run: make race-condition lint-go: @@ -40,25 +40,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.24' - name: Lint Go - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - # caching issues, see: https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052190775 - args: --timeout=10m - skip-pkg-cache: true - skip-build-cache: true + version: v1.64 mod-tidy-check: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.24' - name: Mod Tidy Check run: make mod-tidy-check # Add a job for shellcheck diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index efaadb6..f0f73cb 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -19,9 +19,9 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '^1.21' + go-version: '^1.24' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 diff --git a/config/config.go b/config/config.go index ad82026..7b7f503 100644 --- a/config/config.go +++ b/config/config.go @@ -107,7 +107,7 @@ func (config *Config) Validate() error { } // Handle weird octal conversion - value, err := strconv.ParseInt(fmt.Sprint(config.OutputPermission), 8, 32) + value, err := strconv.ParseUint(fmt.Sprint(config.OutputPermission), 8, 32) if err != nil { errorString := fmt.Sprintf("could not parse output-permissions: %d", config.OutputPermission) returnedError = appendError(returnedError, errorString) @@ -147,7 +147,7 @@ func getExtension(fileName string) string { func appendError(err error, errorString string) error { if err == nil { - return fmt.Errorf(errorString) + return fmt.Errorf("%s", errorString) } return fmt.Errorf("%w; %s", err, errorString) } diff --git a/go.mod b/go.mod index 23db0a7..f2b8053 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/conways-glider/ct -go 1.21 +go 1.24 require ( - github.com/BurntSushi/toml v1.3.2 + github.com/BurntSushi/toml v1.4.0 github.com/hashicorp/hcl v1.0.0 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.9.1 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v3 v3.0.1 ) @@ -16,6 +16,6 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/pflag v1.0.6 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go.sum b/go.sum index d8b9c82..3f63a9b 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -22,10 +22,10 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=