Skip to content

Commit eb60106

Browse files
committed
go-imports
Signed-off-by: RayyanSeliya <[email protected]>
1 parent 323a047 commit eb60106

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cmd/create.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ EXAMPLES
122122
} else if strings.HasPrefix(arg, "-") && len(arg) > 1 {
123123
firstChar := string(arg[1])
124124
shortFlag := cmd.Flags().ShorthandLookup(firstChar)
125-
125+
126126
if shortFlag != nil && len(arg) > 2 && strings.Contains(arg, "-") {
127127
return wrapFlagParsingError(err, arg)
128128
} else if strings.Contains(err.Error(), "unknown shorthand flag") && strings.Contains(err.Error(), arg[1:2]) {
@@ -417,7 +417,7 @@ func newInvalidRuntimeError(client *fn.Client, runtime string) error {
417417
}
418418

419419
baseErr := ErrInvalidRuntime(errors.New(b.String()))
420-
420+
421421
// Check if runtime value indicates mis-parsed function name
422422
for _, arg := range os.Args[1:] {
423423
if strings.HasPrefix(arg, "-") && len(arg) > 2 && strings.Contains(arg[2:], "-") {
@@ -427,7 +427,7 @@ func newInvalidRuntimeError(client *fn.Client, runtime string) error {
427427
}
428428
}
429429
}
430-
430+
431431
return baseErr
432432
}
433433

@@ -447,7 +447,7 @@ func newInvalidTemplateError(client *fn.Client, runtime, template string) error
447447
}
448448

449449
baseErr := ErrInvalidTemplate(errors.New(b.String()))
450-
450+
451451
// Check if template value indicates mis-parsed function name
452452
for _, arg := range os.Args[1:] {
453453
if strings.HasPrefix(arg, "-") && len(arg) > 2 && strings.Contains(arg[2:], "-") {
@@ -457,7 +457,7 @@ func newInvalidTemplateError(client *fn.Client, runtime, template string) error
457457
}
458458
}
459459
}
460-
460+
461461
return baseErr
462462
}
463463

cmd/errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ func wrapFlagParsingErrorWithDetails(err error, suspectedName, flagChar, parsedV
110110
explanation = fmt.Sprintf("It looks like '%s' was interpreted as a long flag.", suspectedName)
111111
} else if len(suspectedName) > 1 && suspectedName[0] == '-' {
112112
if flagChar != "" && parsedValue != "" {
113-
explanation = fmt.Sprintf("It looks like '%s' was interpreted as the flag '-%s' with value '%s'.",
113+
explanation = fmt.Sprintf("It looks like '%s' was interpreted as the flag '-%s' with value '%s'.",
114114
suspectedName, flagChar, parsedValue)
115115
} else {
116116
explanation = fmt.Sprintf("It looks like '%s' was interpreted as a flag.", suspectedName)
117117
}
118118
} else {
119119
return err
120120
}
121-
121+
122122
return fmt.Errorf("%v\n\n"+
123123
"Note: %s\n"+
124124
"Function names cannot start with hyphens per DNS-1035 naming rules.\n"+

0 commit comments

Comments
 (0)