From 292b6cbd84e87e1d32295b9fd6402e92b65772ee Mon Sep 17 00:00:00 2001 From: Christopher Crone Date: Mon, 18 May 2020 11:38:14 +0200 Subject: [PATCH] Use const for default context name Signed-off-by: Christopher Crone --- cli/config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/config/config.go b/cli/config/config.go index 38f9ebec..f473b413 100644 --- a/cli/config/config.go +++ b/cli/config/config.go @@ -34,6 +34,8 @@ import ( "path/filepath" "github.com/pkg/errors" + + "github.com/docker/api/context/store" ) // LoadFile loads the docker configuration @@ -56,7 +58,7 @@ func WriteCurrentContext(dir string, name string) error { return err } // Match existing CLI behavior - if name == "default" { + if name == store.DefaultContextName { delete(m, currentContextKey) } else { m[currentContextKey] = name