Skip to content

Commit 44b6b2a

Browse files
committed
Do not use capital letter at the start nor puntuation signs at the end of error strings
Signed-off-by: Adrian Orive <[email protected]>
1 parent e6a5211 commit 44b6b2a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/init_project.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (o *projectOptions) validate() error {
172172
}
173173

174174
if util.ProjectExist() {
175-
return fmt.Errorf("Failed to initialize project because project is already initialized")
175+
return fmt.Errorf("failed to initialize project because project is already initialized")
176176
}
177177

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

196196
split := strings.Split(string(out), " ")
197197
if len(split) < 3 {
198-
return fmt.Errorf("Found invalid Go version: %q", string(out))
198+
return fmt.Errorf("found invalid Go version: %q", string(out))
199199
}
200200
goVer := split[2]
201201
if err := checkGoVersion(goVer); err != nil {
202-
return fmt.Errorf("Go version '%s' is incompatible because '%s'", goVer, err)
202+
return fmt.Errorf("go version '%s' is incompatible because '%s'", goVer, err)
203203
}
204204
return nil
205205
}

pkg/scaffold/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func (api *API) scaffoldV2() error {
265265
func (api *API) validateResourceGroup(r *resource.Resource) error {
266266
for _, existingGroup := range api.project.ResourceGroups() {
267267
if strings.ToLower(r.Group) != strings.ToLower(existingGroup) {
268-
return fmt.Errorf("Group '%s' is not same as existing group '%s'. Multiple groups are not supported yet.", r.Group, existingGroup)
268+
return fmt.Errorf("group '%s' is not same as existing group '%s'. Multiple groups are not supported yet.", r.Group, existingGroup)
269269
}
270270
}
271271
return nil

0 commit comments

Comments
 (0)