Skip to content

Commit

Permalink
Merge pull request #245 from cpanato/update-go
Browse files Browse the repository at this point in the history
update to go1.22
  • Loading branch information
k8s-ci-robot committed Mar 1, 2024
2 parents 1939938 + e06e390 commit 3c21bcc
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Expand Up @@ -14,11 +14,11 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true

- name: golangci-lint
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.55
version: v1.56
args: --timeout=5m --verbose
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true

- name: Install cosign
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true

- name: Install GoReleaser
Expand Down
1 change: 0 additions & 1 deletion .go-version

This file was deleted.

2 changes: 1 addition & 1 deletion cloudbuild.yaml
Expand Up @@ -21,7 +21,7 @@ steps:
echo "Checking out ${_PULL_BASE_REF}"
git checkout ${_PULL_BASE_REF}
- name: 'gcr.io/k8s-staging-releng/releng-ci:latest-go1.20-bookworm'
- name: 'gcr.io/k8s-staging-releng/releng-ci:latest-go1.22-bookworm'
dir: "go/src/sigs.k8s.io/tejolote"
entrypoint: go
env:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module sigs.k8s.io/tejolote

go 1.21.6
go 1.22

require (
chainguard.dev/apko v0.14.0
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/attest.go
Expand Up @@ -67,7 +67,7 @@ where they came from.
Use: "attest",
SilenceUsage: false,
PersistentPreRunE: initLogging,
RunE: func(cmd *cobra.Command, args []string) (err error) {
RunE: func(_ *cobra.Command, args []string) (err error) {
if len(args) == 0 {
return errors.New("build run spec URL not specified")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/run.go
Expand Up @@ -53,7 +53,7 @@ where they came from.
Use: "run",
SilenceUsage: false,
PersistentPreRunE: initLogging,
RunE: func(cmd *cobra.Command, args []string) (err error) {
RunE: func(_ *cobra.Command, args []string) (err error) {
runner := buildRunner(runOpts)

step := &run.Step{}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/start.go
Expand Up @@ -92,7 +92,7 @@ attestation but with ".storage-snap.json" appended.
Use: "attestation",
SilenceUsage: false,
PersistentPreRunE: initLogging,
RunE: func(cmd *cobra.Command, args []string) (err error) {
RunE: func(_ *cobra.Command, args []string) (err error) {
if err := startAttestationOpts.Validate(); err != nil {
return fmt.Errorf("validating options: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/store/driver/directory_test.go
Expand Up @@ -39,16 +39,16 @@ func TestDirectorySnap(t *testing.T) {
}{
// Two empty directories. No error, no change
{
func(path string) error { return nil },
func(path string) error { return nil },
func(_ string) error { return nil },
func(_ string) error { return nil },
[]run.Artifact{},
},
// One file, unchanged at mutation time
{
func(path string) error {
return os.WriteFile(filepath.Join(path, "test.txt"), []byte("test"), os.FileMode(0o644))
},
func(path string) error { return nil },
func(_ string) error { return nil },
[]run.Artifact{},
},
// One file, rewritten should be reported
Expand Down

0 comments on commit 3c21bcc

Please sign in to comment.