Fix some Go nits.

This commit is contained in:
Jeffrey Regan
2018-08-23 09:59:37 -07:00
parent 67d2c2ed4a
commit 735a93d000
5 changed files with 11 additions and 11 deletions

View File

@@ -69,13 +69,13 @@ and overwrite the previous newTag if the image name exists.
// Validate validates setImageTag command.
func (o *setImageTagOptions) Validate(args []string) error {
if len(args) == 0 {
return errors.New("No image and newTag specified.")
return errors.New("no image and newTag specified")
}
o.imageTagMap = make(map[string]string)
for _, arg := range args {
imagetag := pattern.FindStringSubmatch(arg)
if len(imagetag) != 3 {
return errors.New("Invalid format of imagetag, must specify it as <image>:<newtag>")
return errors.New("invalid format of imagetag, must specify it as <image>:<newtag>")
}
o.imageTagMap[imagetag[1]] = imagetag[2]
}