Skip to content
Merged
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 cli-plugins/hooks/hook_types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

// Package hooks defines the contract between the Docker CLI and CLI plugin hook
// implementations.
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/hooks/template.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package hooks

Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/error.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package manager

Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/hooks.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package manager

Expand Down
6 changes: 4 additions & 2 deletions cli-plugins/manager/plugin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.26

package manager

import (
Expand Down Expand Up @@ -167,8 +170,7 @@ func (p *Plugin) RunHook(ctx context.Context, hookData hooks.Request) ([]byte, e

out, err := pCmd.Output()
if err != nil {
var exitErr *exec.ExitError
if errors.As(err, &exitErr) {
if _, ok := errors.AsType[*exec.ExitError](err); ok {
return nil, wrapAsPluginError(err, "plugin hook subcommand exited unsuccessfully")
}
return nil, wrapAsPluginError(err, "failed to execute plugin hook subcommand: "+pCmd.String())
Expand Down
6 changes: 4 additions & 2 deletions cli-plugins/plugin/plugin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.26

package plugin

import (
Expand Down Expand Up @@ -97,8 +100,7 @@ func Run(makeCmd func(command.Cli) *cobra.Command, meta metadata.Metadata, ops .
plugin := makeCmd(dockerCLI)

if err := RunPlugin(dockerCLI, plugin, meta); err != nil {
var stErr cli.StatusError
if errors.As(err, &stErr) {
if stErr, ok := errors.AsType[cli.StatusError](err); ok {
// StatusError should only be used for errors, and all errors should
// have a non-zero exit status, so never exit with 0
if stErr.StatusCode == 0 { // FIXME(thaJeztah): this should never be used with a zero status-code. Check if we do this anywhere.
Expand Down
2 changes: 1 addition & 1 deletion cli/command/cli.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package command

Expand Down
2 changes: 1 addition & 1 deletion cli/command/config/formatter.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package config

Expand Down
2 changes: 1 addition & 1 deletion cli/command/config/inspect.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package config

Expand Down
2 changes: 1 addition & 1 deletion cli/command/container/completion.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package container

Expand Down
2 changes: 1 addition & 1 deletion cli/command/container/inspect.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package container

Expand Down
2 changes: 1 addition & 1 deletion cli/command/container/opts.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package container

Expand Down
6 changes: 4 additions & 2 deletions cli/command/container/start.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.26

package container

import (
Expand Down Expand Up @@ -169,8 +172,7 @@ func RunStart(ctx context.Context, dockerCli command.Cli, opts *StartOptions) er
}
}
if attachErr := <-cErr; attachErr != nil {
var escapeError term.EscapeError
if errors.As(attachErr, &escapeError) {
if _, ok := errors.AsType[term.EscapeError](attachErr); ok {
// The user entered the detach escape sequence.
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion cli/command/container/stats.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package container

Expand Down
2 changes: 1 addition & 1 deletion cli/command/container/tty.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package container

Expand Down
2 changes: 1 addition & 1 deletion cli/command/context.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package command

Expand Down
2 changes: 1 addition & 1 deletion cli/command/context/completion.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package context

Expand Down
2 changes: 1 addition & 1 deletion cli/command/context/create.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package context

Expand Down
2 changes: 1 addition & 1 deletion cli/command/context/create_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package context

Expand Down
2 changes: 1 addition & 1 deletion cli/command/context/inspect.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package context

Expand Down
2 changes: 1 addition & 1 deletion cli/command/context/list.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package context

Expand Down
6 changes: 4 additions & 2 deletions cli/command/context/options.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.26

package context

import (
Expand Down Expand Up @@ -69,8 +72,7 @@ func parseBool(config map[string]string, name string) (bool, error) {
}
res, err := strconv.ParseBool(strVal)
if err != nil {
var nErr *strconv.NumError
if errors.As(err, &nErr) {
if nErr, ok := errors.AsType[*strconv.NumError](err); ok {
return res, fmt.Errorf("%s: parsing %q: %w", name, nErr.Num, nErr.Err)
}
return res, fmt.Errorf("%s: %w", name, err)
Expand Down
2 changes: 1 addition & 1 deletion cli/command/context_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package command

Expand Down
2 changes: 1 addition & 1 deletion cli/command/defaultcontextstore.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package command

Expand Down
2 changes: 1 addition & 1 deletion cli/command/defaultcontextstore_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package command

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/container.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/container_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/custom.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/displayutils.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/formatter.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/formatter_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/reflect.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/reflect_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/volume.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/formatter/volume_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package formatter

Expand Down
2 changes: 1 addition & 1 deletion cli/command/idresolver/idresolver.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package idresolver

Expand Down
6 changes: 4 additions & 2 deletions cli/command/image/build.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.26

package image

import (
Expand Down Expand Up @@ -364,8 +367,7 @@ func runBuild(ctx context.Context, dockerCli command.Cli, options buildOptions)

err = jsonstream.Display(ctx, response.Body, streams.NewOut(buildBuff), jsonstream.WithAuxCallback(aux))
if err != nil {
var jerr *jsonstream.JSONError
if errors.As(err, &jerr) {
if jerr, ok := errors.AsType[*jsonstream.JSONError](err); ok {
// If no error code is set, default to 1
if jerr.Code == 0 {
jerr.Code = 1
Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/inspect.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package image

Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/list.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package image

Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/push.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package image

Expand Down
2 changes: 1 addition & 1 deletion cli/command/image/tree.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package image

Expand Down
2 changes: 1 addition & 1 deletion cli/command/inspect/inspector.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package inspect

Expand Down
2 changes: 1 addition & 1 deletion cli/command/manifest/annotate.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.25
//go:build go1.26

package manifest

Expand Down
Loading
Loading