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

@ -70,12 +70,12 @@ func (c *Command) genZshCompletion(w io.Writer, includeDesc bool) error {
return err
}
func genZshComp(buf *bytes.Buffer, name string, includeDesc bool) {
func genZshComp(buf io.StringWriter, name string, includeDesc bool) {
compCmd := ShellCompRequestCmd
if !includeDesc {
compCmd = ShellCompNoDescRequestCmd
}
buf.WriteString(fmt.Sprintf(`#compdef _%[1]s %[1]s
WriteStringAndCheck(buf, fmt.Sprintf(`#compdef _%[1]s %[1]s
# zsh completion for %-36[1]s -*- shell-script -*-