Fix some comment nits.

This commit is contained in:
Jeffrey Regan
2019-04-19 09:26:54 -07:00
parent c752660aa6
commit a914570240
5 changed files with 25 additions and 17 deletions

View File

@@ -96,10 +96,11 @@ func NewCmdBuild(
// Validate validates build command.
func (o *Options) Validate(args []string) error {
if len(args) > 1 {
return errors.New("specify one path to " + pgmconfig.KustomizationFileNames[0])
return errors.New(
"specify one path to " + pgmconfig.KustomizationFileNames[0])
}
if len(args) == 0 {
o.kustomizationPath = "./"
o.kustomizationPath = loader.CWD
} else {
o.kustomizationPath = args[0]
}

View File

@@ -35,7 +35,7 @@ func TestBuildValidate(t *testing.T) {
path string
erMsg string
}{
{"noargs", []string{}, "./", ""},
{"noargs", []string{}, ".", ""},
{"file", []string{"beans"}, "beans", ""},
{"path", []string{"a/b/c"}, "a/b/c", ""},
{"path", []string{"too", "many"},
@@ -54,7 +54,7 @@ func TestBuildValidate(t *testing.T) {
continue
}
if e != nil {
t.Errorf("%s: unknown error %v", mycase.name, e)
t.Errorf("%s: unknown error: %v", mycase.name, e)
continue
}
if opts.kustomizationPath != mycase.path {