From c29ece4386f74084680e5e6d02d7b943ae630f63 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 26 Jan 2017 14:32:19 -0500 Subject: [PATCH] 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 * test: cleanup for go vet Looks like copy'pasta and an unused variable Signed-off-by: Vincent Batts --- bash_completions.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash_completions.go b/bash_completions.go index 59b55068..8820ba8f 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -23,7 +23,7 @@ func preamble(out io.Writer, name string) error { if err != nil { return err } - _, err = fmt.Fprint(out, ` + preamStr := ` __debug() { if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then @@ -247,7 +247,8 @@ __handle_word() __handle_word } -`) +` + _, err = fmt.Fprint(out, preamStr) return err }