Skip to content

Commit

Permalink
Do not use capital letter at the start nor puntuation signs at the en…
Browse files Browse the repository at this point in the history
…d of error strings

Signed-off-by: Adrian Orive <[email protected]>
  • Loading branch information
Adirio committed Nov 12, 2019
1 parent e6a5211 commit 44b6b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/init_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (o *projectOptions) validate() error {
}

if util.ProjectExist() {
return fmt.Errorf("Failed to initialize project because project is already initialized")
return fmt.Errorf("failed to initialize project because project is already initialized")
}

return nil
Expand All @@ -190,16 +190,16 @@ func fetchAndCheckGoVersion() error {
cmd := exec.Command("go", "version")
out, err := cmd.Output()
if err != nil {
return fmt.Errorf("Failed to retrieve 'go version': %v", string(out))
return fmt.Errorf("failed to retrieve 'go version': %v", string(out))
}

split := strings.Split(string(out), " ")
if len(split) < 3 {
return fmt.Errorf("Found invalid Go version: %q", string(out))
return fmt.Errorf("found invalid Go version: %q", string(out))
}
goVer := split[2]
if err := checkGoVersion(goVer); err != nil {
return fmt.Errorf("Go version '%s' is incompatible because '%s'", goVer, err)
return fmt.Errorf("go version '%s' is incompatible because '%s'", goVer, err)
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/scaffold/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (api *API) scaffoldV2() error {
func (api *API) validateResourceGroup(r *resource.Resource) error {
for _, existingGroup := range api.project.ResourceGroups() {
if strings.ToLower(r.Group) != strings.ToLower(existingGroup) {
return fmt.Errorf("Group '%s' is not same as existing group '%s'. Multiple groups are not supported yet.", r.Group, existingGroup)
return fmt.Errorf("group '%s' is not same as existing group '%s'. Multiple groups are not supported yet.", r.Group, existingGroup)
}
}
return nil
Expand Down

0 comments on commit 44b6b2a

Please sign in to comment.