DockerCLI/cli/context/store
Sebastiaan van Stijn 2c9dff1436
cli/command/context: context ls: always show current context
if a context is set (e.g. through DOCKER_CONTEXT or the CLI config file), but
wasn't found, then a "stub" context is added, including an error message that
the context doesn't exist.

    DOCKER_CONTEXT=nosuchcontext docker context ls
    NAME              DESCRIPTION                               DOCKER ENDPOINT               ERROR
    default           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock
    nosuchcontext *                                                                           context "nosuchcontext": context not found: …

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-28 23:41:29 +01:00
..
doc.go format (GoDoc) comments with Go 1.19 to prepare for go updates 2022-07-19 19:10:16 +02:00
io_utils.go Introduce .zip import for docker context 2019-05-29 12:58:45 -07:00
io_utils_test.go cli/context: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:16 +01:00
metadata_test.go cli/context/store: simplify error handling, and make it more idiomatic 2022-09-30 11:19:25 +02:00
metadatastore.go cli/command/context: context ls: always show current context 2022-11-28 23:41:29 +01:00
store.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
store_test.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
storeconfig.go cli/context/store: New(): return concrete type 2022-09-30 11:19:25 +02:00
storeconfig_test.go cli/context/store: New(): return concrete type 2022-09-30 11:19:25 +02:00
tlsstore.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
tlsstore_test.go cli/context/store: rename removeAllContextData(), removeAllEndpointData() 2022-09-30 11:19:26 +02:00