Enable golangci linter stylecheck (#3167)

This PR only fixes error string formatting, log message strings are
still mixed upper/lowercase (see
https://github.com/woodpecker-ci/woodpecker/pull/3161#issuecomment-1885140649)
and I'm not aware of a linter to enforce it.
This commit is contained in:
Robert Kaussow
2024-01-10 22:56:42 +01:00
committed by GitHub
parent 00df53e941
commit 7756c60a33
58 changed files with 126 additions and 129 deletions
-1
View File
@@ -64,7 +64,6 @@ func FormatFlag(tmpl string, hidden ...bool) *cli.StringFlag {
}
}
// specify repository
var RepoFlag = &cli.StringFlag{
Name: "repository",
Aliases: []string{"repo"},
+2 -2
View File
@@ -97,7 +97,7 @@ func deploy(c *cli.Context) error {
}
}
if number == 0 {
return fmt.Errorf("Cannot deploy failure pipeline")
return fmt.Errorf("cannot deploy failure pipeline")
}
} else {
number, err = strconv.ParseInt(pipelineArg, 10, 64)
@@ -108,7 +108,7 @@ func deploy(c *cli.Context) error {
env := c.Args().Get(2)
if env == "" {
return fmt.Errorf("Please specify the target environment (ie production)")
return fmt.Errorf("please specify the target environment (i.e. production)")
}
params := internal.ParseKeyPair(c.StringSlice("param"))
+1 -1
View File
@@ -41,7 +41,7 @@ func userInfo(c *cli.Context) error {
login := c.Args().First()
if len(login) == 0 {
return fmt.Errorf("Missing or invalid user login")
return fmt.Errorf("missing or invalid user login")
}
user, err := client.User(login)