MCPcopy Index your code
hub / github.com/docker/cli / CurrentContext

Method CurrentContext

cli/command/cli.go:429–431  ·  view source on GitHub ↗

CurrentContext returns the current context name, based on flags, environment variables and the cli configuration file, in the following order of preference: 1. The "--context" command-line option. 2. The "DOCKER_CONTEXT" environment variable ([EnvOverrideContext]). 3. The current context as configu

()

Source from the content-addressed store, hash-verified

427// CurrentContext does not validate if the given context exists or if it's
428// valid; errors may occur when trying to use it.
429func (cli *DockerCli) CurrentContext() string {
430 return cli.currentContext
431}
432
433// CurrentContext returns the current context name, based on flags,
434// environment variables and the cli configuration file. It does not

Callers 1

getDockerEndPointMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected