mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
vendor: github.com/docker/docker-credential-helpers v0.9.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
534d9fc276
commit
86e4e77ac1
2
go.mod
2
go.mod
@ -95,7 +95,7 @@ require (
|
|||||||
github.com/containerd/ttrpc v1.2.7 // indirect
|
github.com/containerd/ttrpc v1.2.7 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
|
||||||
github.com/docker/distribution v2.8.3+incompatible // indirect
|
github.com/docker/distribution v2.8.3+incompatible // indirect
|
||||||
github.com/docker/docker-credential-helpers v0.8.2 // indirect
|
github.com/docker/docker-credential-helpers v0.9.3 // indirect
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
|
||||||
github.com/docker/go-connections v0.5.0 // indirect
|
github.com/docker/go-connections v0.5.0 // indirect
|
||||||
github.com/docker/go-metrics v0.0.1 // indirect
|
github.com/docker/go-metrics v0.0.1 // indirect
|
||||||
|
4
go.sum
4
go.sum
@ -130,8 +130,8 @@ github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBi
|
|||||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||||
github.com/docker/docker v28.0.4+incompatible h1:JNNkBctYKurkw6FrHfKqY0nKIDf5nrbxjVBtS+cdcok=
|
github.com/docker/docker v28.0.4+incompatible h1:JNNkBctYKurkw6FrHfKqY0nKIDf5nrbxjVBtS+cdcok=
|
||||||
github.com/docker/docker v28.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
github.com/docker/docker v28.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||||
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
|
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
|
||||||
github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
|
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q=
|
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q=
|
||||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||||
|
29
vendor/github.com/docker/docker-credential-helpers/client/command.go
generated
vendored
29
vendor/github.com/docker/docker-credential-helpers/client/command.go
generated
vendored
@ -15,27 +15,30 @@ type Program interface {
|
|||||||
// ProgramFunc is a type of function that initializes programs based on arguments.
|
// ProgramFunc is a type of function that initializes programs based on arguments.
|
||||||
type ProgramFunc func(args ...string) Program
|
type ProgramFunc func(args ...string) Program
|
||||||
|
|
||||||
// NewShellProgramFunc creates programs that are executed in a Shell.
|
// NewShellProgramFunc creates a [ProgramFunc] to run command in a [Shell].
|
||||||
func NewShellProgramFunc(name string) ProgramFunc {
|
func NewShellProgramFunc(command string) ProgramFunc {
|
||||||
return NewShellProgramFuncWithEnv(name, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables
|
|
||||||
func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc {
|
|
||||||
return func(args ...string) Program {
|
return func(args ...string) Program {
|
||||||
return &Shell{cmd: createProgramCmdRedirectErr(name, args, env)}
|
return createProgramCmdRedirectErr(command, args, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func createProgramCmdRedirectErr(commandName string, args []string, env *map[string]string) *exec.Cmd {
|
// NewShellProgramFuncWithEnv creates a [ProgramFunc] tu run command
|
||||||
programCmd := exec.Command(commandName, args...)
|
// in a [Shell] with the given environment variables.
|
||||||
|
func NewShellProgramFuncWithEnv(command string, env *map[string]string) ProgramFunc {
|
||||||
|
return func(args ...string) Program {
|
||||||
|
return createProgramCmdRedirectErr(command, args, env)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func createProgramCmdRedirectErr(command string, args []string, env *map[string]string) *Shell {
|
||||||
|
ec := exec.Command(command, args...)
|
||||||
if env != nil {
|
if env != nil {
|
||||||
for k, v := range *env {
|
for k, v := range *env {
|
||||||
programCmd.Env = append(programCmd.Environ(), k+"="+v)
|
ec.Env = append(ec.Environ(), k+"="+v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
programCmd.Stderr = os.Stderr
|
ec.Stderr = os.Stderr
|
||||||
return programCmd
|
return &Shell{cmd: ec}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shell invokes shell commands to talk with a remote credentials-helper.
|
// Shell invokes shell commands to talk with a remote credentials-helper.
|
||||||
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@ -319,8 +319,8 @@ github.com/docker/docker/pkg/namesgenerator
|
|||||||
github.com/docker/docker/pkg/stdcopy
|
github.com/docker/docker/pkg/stdcopy
|
||||||
github.com/docker/docker/pkg/stringid
|
github.com/docker/docker/pkg/stringid
|
||||||
github.com/docker/docker/registry
|
github.com/docker/docker/registry
|
||||||
# github.com/docker/docker-credential-helpers v0.8.2
|
# github.com/docker/docker-credential-helpers v0.9.3
|
||||||
## explicit; go 1.19
|
## explicit; go 1.21
|
||||||
github.com/docker/docker-credential-helpers/client
|
github.com/docker/docker-credential-helpers/client
|
||||||
github.com/docker/docker-credential-helpers/credentials
|
github.com/docker/docker-credential-helpers/credentials
|
||||||
# github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c
|
# github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user