Skip to content

Commit

Permalink
Merge pull request #2297 from mtrmac/go1.21
Browse files Browse the repository at this point in the history
Update to Go 1.21
  • Loading branch information
mtrmac authored Apr 22, 2024
2 parents 50159e2 + 49ba503 commit d4e8198
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cmd/skopeo/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"path"
"path/filepath"
"regexp"
"slices"
"strings"

"github.com/Masterminds/semver/v3"
Expand All @@ -27,7 +28,6 @@ import (
"github.com/opencontainers/go-digest"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/exp/slices"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/skopeo/unshare_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package main

import (
"fmt"
"slices"

"github.com/containers/image/v5/transports/alltransports"
"github.com/containers/storage/pkg/unshare"
"github.com/syndtr/gocapability/capability"
"golang.org/x/exp/slices"
)

var neededCapabilities = []capability.Cap{
Expand Down
17 changes: 3 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
module github.com/containers/skopeo

// Minimum required golang version
go 1.20 // ***** ATTENTION WARNING CAUTION DANGER ******
go 1.21

// Go versions 1.21 and later will AUTO-UPDATE based
// on currently running tools and the (new) `toolchain`
// value (when also increasing the `go` value above).
// ref: https://go.dev/doc/toolchain Because several
// different distros and distro-versions build from
// this code, golang version consistency is
// desireable. After manually updating to 1.21, a
// `toolchain` specificication should be added to pin
// the version and block auto-updates. This does not
// block any future changes to the `go` value.
// Ref: Upstream discussion:
// https://github.com/golang/go/issues/65847
// ***** ATTENTION WARNING CAUTION DANGER ******
// Warning: Ensure the "go" and "toolchain" versions match exactly to prevent unwanted auto-updates
toolchain go1.21.0

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand Down
Loading

1 comment on commit d4e8198

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.