Removed capitalization in Error string message

* This commit will removed capitalizaion in Error message
  and follow the Golang code rule.
* Golang errors should not begin with capitalization:
  https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Signed-off-by: bijayasharma <vetbijaya@gmail.com>
Change-Id: I053cfa9e21ad56b0f30e476ec36320cb7cea4da4
This commit is contained in:
bijayasharma 2021-01-26 14:08:58 -05:00 committed by Bijaya Sharma
parent 8efb786a6a
commit 661ae70fd0
8 changed files with 11 additions and 10 deletions

View File

@ -52,7 +52,7 @@ func NewGenerateEncryptionKeyCommand() *cobra.Command {
Example: cmdExample,
RunE: func(cmd *cobra.Command, args []string) error {
if cmd.Flags().Changed("limit") && !cmd.Flags().Changed("regex") {
return fmt.Errorf("Required Regex flag with limit option")
return fmt.Errorf("required Regex flag with limit option")
}
if cmd.Flags().Changed("regex") && cmd.Flags().Changed("limit") {
return errors.ErrNotImplemented{What: "Regex support not implemented yet!"}

View File

@ -32,7 +32,7 @@ func TestGenerateEncryptionKey(t *testing.T) {
{
Name: "generate-encryptionkey-cmd-error",
CmdLine: "--limit 10",
Error: fmt.Errorf("Required Regex flag with limit option"),
Error: fmt.Errorf("required Regex flag with limit option"),
Cmd: encryptionkey.NewGenerateEncryptionKeyCommand(),
},
}

View File

@ -1,4 +1,4 @@
Error: Required Regex flag with limit option
Error: required Regex flag with limit option
Usage:
encryptionkey [flags]

View File

@ -13,7 +13,7 @@ airshipctl image build [flags]
### Options
```
-h, --help help for build
-h, --help help for build
```
### Options inherited from parent commands

View File

@ -25,6 +25,7 @@ airshipctl phase run ephemeral-control-plane
--dry-run simulate phase execution
-h, --help help for run
--kubeconfig string Path to kubeconfig associated with site being managed
--progress show progress
--wait-timeout duration wait timeout
```

View File

@ -75,7 +75,7 @@ func (t *plugin) Filter(items []*yaml.RNode) ([]*yaml.RNode, error) {
res, ok := p.Outputs[0].(*kio.PackageBuffer)
if !ok {
return nil, fmt.Errorf("Output conversion error")
return nil, fmt.Errorf("output conversion error")
}
return append(items, res.Nodes...), nil
}

View File

@ -43,9 +43,9 @@ func TestPrintEvent(t *testing.T) {
{
name: "Fail on formatter type",
formatterType: events.YAMLPrinter,
errString: "Error on write",
errString: "error on write",
writer: fakeWriter{
writeErr: fmt.Errorf("Error on write"),
writeErr: fmt.Errorf("error on write"),
},
},
}

View File

@ -83,9 +83,9 @@ users:
)
var (
errTempFile = fmt.Errorf("TempFile Error")
errSourceFunc = fmt.Errorf("Source func error")
errWriter = fmt.Errorf("Writer error")
errTempFile = fmt.Errorf("tempFile Error")
errSourceFunc = fmt.Errorf("source func error")
errWriter = fmt.Errorf("writer error")
testValidKubeconfigAPI = &v1alpha1.KubeConfig{
Config: v1.Config{
CurrentContext: "test",