Use golangci-lint (#1044)

Use golangci-lint. Repair warnings and errors resulting from linting.
This commit is contained in:
Unai Martinez-Corral
2021-02-08 00:08:50 +00:00
committed by GitHub
parent 1d71ff0270
commit 652c755d37
32 changed files with 437 additions and 525 deletions

View File

@ -99,8 +99,7 @@ cmd := &cobra.Command{
Long: get_long,
Example: get_example,
Run: func(cmd *cobra.Command, args []string) {
err := RunGet(f, out, cmd, args)
util.CheckErr(err)
cobra.CheckErr(RunGet(f, out, cmd, args))
},
ValidArgs: validArgs,
}
@ -132,7 +131,7 @@ the completion algorithm if entered manually, e.g. in:
```bash
$ kubectl get rc [tab][tab]
backend frontend database
backend frontend database
```
Note that without declaring `rc` as an alias, the completion algorithm would not know to show the list of
@ -254,7 +253,7 @@ and you'll get something like
```bash
$ kubectl exec [tab][tab]
-c --container= -p --pod=
-c --container= -p --pod=
```
### Specify dynamic flag completion