cliconfig: use a const for ".docker" string

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 565712014f3dfe01b0b5012ab46a7e26217538f2
Component: engine
This commit is contained in:
Antonio Murdaca
2016-02-29 14:44:01 +01:00
parent c762170458
commit 3bd6e595b8
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ import (
const (
// ConfigFileName is the name of config file
ConfigFileName = "config.json"
configFileDir = ".docker"
oldConfigfile = ".dockercfg"
// This constant is only used for really old config files when the
@@ -31,7 +32,7 @@ var (
func init() {
if configDir == "" {
configDir = filepath.Join(homedir.Get(), ".docker")
configDir = filepath.Join(homedir.Get(), configFileDir)
}
}
+1 -1
View File
@@ -142,7 +142,7 @@ func rawJSON(value interface{}) *json.RawMessage {
// ValidateID checks whether an ID string is a valid image ID.
func ValidateID(id string) error {
if ok := validHex.MatchString(id); !ok {
return fmt.Errorf("image ID '%s' is invalid ", id)
return fmt.Errorf("image ID %q is invalid", id)
}
return nil
}