cli/command: remove WithContextEndpointType() as it's unused
This was added in 3126920af14ea5127e00a2f8f9d8e07a6c3f6ff9, and modified in 520be05c494940dfd70f1c43765c52735570f212, but is not used anywhere. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6874c2e80b
commit
5ed92699f3
@ -1,13 +1,10 @@
|
|||||||
package command
|
package command
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/docker/cli/cli/context/docker"
|
|
||||||
"github.com/docker/cli/cli/context/store"
|
|
||||||
"github.com/docker/cli/cli/streams"
|
"github.com/docker/cli/cli/streams"
|
||||||
"github.com/moby/term"
|
"github.com/moby/term"
|
||||||
)
|
)
|
||||||
@ -82,19 +79,6 @@ func WithContentTrust(enabled bool) DockerCliOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithContextEndpointType add support for an additional typed endpoint in the context store
|
|
||||||
// Plugins should use this to store additional endpoints configuration in the context store
|
|
||||||
func WithContextEndpointType(endpointName string, endpointType store.TypeGetter) DockerCliOption {
|
|
||||||
return func(cli *DockerCli) error {
|
|
||||||
switch endpointName {
|
|
||||||
case docker.DockerEndpoint:
|
|
||||||
return fmt.Errorf("cannot change %q endpoint type", endpointName)
|
|
||||||
}
|
|
||||||
cli.contextStoreConfig.SetEndpoint(endpointName, endpointType)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaultContextStoreConfig configures the cli to use the default context store configuration.
|
// WithDefaultContextStoreConfig configures the cli to use the default context store configuration.
|
||||||
func WithDefaultContextStoreConfig() DockerCliOption {
|
func WithDefaultContextStoreConfig() DockerCliOption {
|
||||||
return func(cli *DockerCli) error {
|
return func(cli *DockerCli) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user