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>
This commit is contained in:
Vincent Batts 2016-09-08 09:45:52 -04:00
parent f368244301
commit d99d0713f1
No known key found for this signature in database
GPG key ID: 10937E57733F1362

View file

@ -22,7 +22,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
@ -241,7 +241,8 @@ __handle_word()
__handle_word __handle_word
} }
`) `
_, err = fmt.Fprint(out, preamStr)
return err return err
} }