From d99d0713f1b739283485aaa1f28abf2b2761b56e Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 8 Sep 2016 09:45:52 -0400 Subject: [PATCH] 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 --- bash_completions.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash_completions.go b/bash_completions.go index 3f33bb0e..cd6c8220 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -22,7 +22,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 @@ -241,7 +241,8 @@ __handle_word() __handle_word } -`) +` + _, err = fmt.Fprint(out, preamStr) return err }