From 3ae517089f9ba1ae206361c396473c73f894bbe0 Mon Sep 17 00:00:00 2001 From: Tom Fleet Date: Sat, 17 Aug 2024 10:25:57 +0100 Subject: [PATCH 1/3] Bump to Go 1.23 --- Taskfile.yml | 2 +- args.go | 2 ++ go.mod | 9 ++++++--- go.sum | 6 ++++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 071dd52..67322be 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -63,7 +63,7 @@ tasks: msg: nilaway not installed, see https://github.com/uber-go/nilaway cmds: - golangci-lint run --fix - - nilaway -include-pkgs="{{.PACKAGE}}" ./... + # - nilaway -include-pkgs="{{.PACKAGE}}" ./... # nilaway doesn't work with go 1.23 yet docs: desc: Render the pkg docs locally diff --git a/args.go b/args.go index 42d37a7..a7b5628 100644 --- a/args.go +++ b/args.go @@ -83,6 +83,8 @@ func ExactArgs(n int) ArgValidator { // BetweenArgs is a positional argument validator that allows between min and max arguments (inclusive), // any outside that range will return an error. +// +//nolint:predeclared // min has same name as min function but we don't use it here and the clarity is worth it func BetweenArgs(min, max int) ArgValidator { return func(cmd *Command, args []string) error { nArgs := len(args) diff --git a/go.mod b/go.mod index b98a239..762a248 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,10 @@ module github.com/FollowTheProcess/cli -go 1.22 +go 1.23 -require github.com/FollowTheProcess/test v0.12.1 +require github.com/FollowTheProcess/test v0.14.0 -require github.com/google/go-cmp v0.6.0 // indirect +require ( + github.com/aymanbagabas/go-udiff v0.2.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect +) diff --git a/go.sum b/go.sum index ef913b3..419c197 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,6 @@ -github.com/FollowTheProcess/test v0.12.1 h1:kgdT9RhuWfWuk9PUj7my08quuZhh0J0Rs10Vozn9/8g= -github.com/FollowTheProcess/test v0.12.1/go.mod h1:oIqlUoS8wKFmKBFBMJH/+asP7lQXE2D3YFhmUEubTUw= +github.com/FollowTheProcess/test v0.14.0 h1:Iegv9JbH8eV8Va/Nw2xaL+feVKEfAFzI5RiBPksNahY= +github.com/FollowTheProcess/test v0.14.0/go.mod h1:WwdigHlEGoXEzt8n/VGpqrNkD3j5gHsqBjYduqTqRE0= +github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= +github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= From 2d34b922e39acc65231f95e65df6587ead6ca798 Mon Sep 17 00:00:00 2001 From: Tom Fleet Date: Sat, 17 Aug 2024 10:28:08 +0100 Subject: [PATCH 2/3] Is the go clean modcache still needed --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 49b40fa..a05271a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -77,8 +77,8 @@ jobs: with: go-version-file: go.mod - - name: Clean Mod Cache # See https://github.com/golangci/golangci-lint-action/issues/135 - run: go clean -modcache + # - name: Clean Mod Cache # See https://github.com/golangci/golangci-lint-action/issues/135 + # run: go clean -modcache - name: Run Linting uses: golangci/golangci-lint-action@v6 From c32dfff9d301db21db148fb73b23f45964ce0009 Mon Sep 17 00:00:00 2001 From: Tom Fleet Date: Sat, 17 Aug 2024 10:29:19 +0100 Subject: [PATCH 3/3] No it's not --- .github/workflows/CI.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a05271a..b2d7310 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -77,9 +77,6 @@ jobs: with: go-version-file: go.mod - # - name: Clean Mod Cache # See https://github.com/golangci/golangci-lint-action/issues/135 - # run: go clean -modcache - - name: Run Linting uses: golangci/golangci-lint-action@v6 with: