mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Go vet (#345)
* bash_completions: cleanup for go vet The gnarly block of string in the Fprint tripped up go vet and was not easy to read. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> * test: cleanup for go vet Looks like copy'pasta and an unused variable Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
0f056af21f
commit
c29ece4386
1 changed files with 3 additions and 2 deletions
|
@ -23,7 +23,7 @@ func preamble(out io.Writer, name string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, err = fmt.Fprint(out, `
|
preamStr := `
|
||||||
__debug()
|
__debug()
|
||||||
{
|
{
|
||||||
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
|
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
|
||||||
|
@ -247,7 +247,8 @@ __handle_word()
|
||||||
__handle_word
|
__handle_word
|
||||||
}
|
}
|
||||||
|
|
||||||
`)
|
`
|
||||||
|
_, err = fmt.Fprint(out, preamStr)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue