diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index cd29cedd..860ce2ca 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -26,4 +26,4 @@ jobs: - name: Check bugs and unused code uses: golangci/golangci-lint-action@v3 with: - version: v1.54.1 + version: v1.63.4 diff --git a/go.mod b/go.mod index e5c2e118..9bab9710 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/canonical/chisel -go 1.21 +go 1.22 require ( github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb diff --git a/internal/manifestutil/manifestutil.go b/internal/manifestutil/manifestutil.go index b791130d..16b05402 100644 --- a/internal/manifestutil/manifestutil.go +++ b/internal/manifestutil/manifestutil.go @@ -176,9 +176,7 @@ func fastValidate(options *WriteOptions) (err error) { } } if entry.Inode != 0 { - // TODO remove the following line after upgrading to Go 1.22 or higher. - e := entry - hardLinkGroups[e.Inode] = append(hardLinkGroups[e.Inode], &e) + hardLinkGroups[entry.Inode] = append(hardLinkGroups[entry.Inode], &entry) } } // Entries within a hard link group must have same content. diff --git a/internal/setup/yaml.go b/internal/setup/yaml.go index 8ae3b3b3..0a5abcc2 100644 --- a/internal/setup/yaml.go +++ b/internal/setup/yaml.go @@ -506,8 +506,6 @@ func sliceToYAML(s *Slice) (*yamlSlice, error) { slice.Essential = append(slice.Essential, key.String()) } for path, info := range s.Contents { - // TODO remove the following line after upgrading to Go 1.22 or higher. - info := info yamlPath, err := pathInfoToYAML(&info) if err != nil { return nil, err diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 3452163e..2839ad4e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -29,7 +29,7 @@ parts: plugin: go source: . build-snaps: - - go/1.21/stable + - go/1.22/stable build-environment: - CGO_ENABLED: 0 - GOFLAGS: -trimpath -ldflags=-w -ldflags=-s