Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/ctr/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func AnnotationArgs(annoStrings []string) (map[string]string, error) {
}

// PrintAsJSON prints input in JSON format
func PrintAsJSON(x interface{}) {
func PrintAsJSON(x any) {
b, err := json.MarshalIndent(x, "", " ")
if err != nil {
fmt.Fprintf(os.Stderr, "can't marshal %+v as a JSON string: %v\n", x, err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ var infoCommand = cli.Command{
}
commands.PrintAsJSON(struct {
containers.Container
Spec interface{} `json:"Spec,omitempty"`
Spec any `json:"Spec,omitempty"`
}{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You commit is missing a Signed-off-by.

Container: info,
Spec: v,
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/run/run_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func getRuncOptions(context *cli.Context) (*options.Options, error) {
return runtimeOpts, nil
}

func getRuntimeOptions(context *cli.Context) (interface{}, error) {
func getRuntimeOptions(context *cli.Context) (any, error) {
// validate first
if (context.String("runc-binary") != "" || context.Bool("runc-systemd-cgroup")) &&
context.String("runtime") != "io.containerd.runc.v2" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ctr/commands/run/run_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
}

runtime := context.String("runtime")
var runtimeOpts interface{}
var runtimeOpts any
if runtime == "io.containerd.runhcs.v1" {
runtimeOpts = &options.Options{
Debug: context.Bool("debug"),
Expand Down
Loading