mirror of
https://github.com/docker/compose.git
synced 2025-07-27 07:34:10 +02:00
Use const for default context name
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
This commit is contained in:
parent
cd6d192d07
commit
292b6cbd84
@ -34,6 +34,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
|
"github.com/docker/api/context/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LoadFile loads the docker configuration
|
// LoadFile loads the docker configuration
|
||||||
@ -56,7 +58,7 @@ func WriteCurrentContext(dir string, name string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Match existing CLI behavior
|
// Match existing CLI behavior
|
||||||
if name == "default" {
|
if name == store.DefaultContextName {
|
||||||
delete(m, currentContextKey)
|
delete(m, currentContextKey)
|
||||||
} else {
|
} else {
|
||||||
m[currentContextKey] = name
|
m[currentContextKey] = name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user