From eb7bad8151879fb2ff141aeceeffd580297040ed Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Fri, 20 Nov 2015 15:49:31 -0500 Subject: [PATCH] Ignore expected error * Expected error no buildable Go source files in... --- misc.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc.go b/misc.go index b094497..f5f43a1 100644 --- a/misc.go +++ b/misc.go @@ -6,6 +6,7 @@ import ( "log" "os" "os/exec" + "strings" ) func executeCmd(command string, args ...string) { @@ -35,7 +36,12 @@ func executeCmd(command string, args ...string) { stdErrScanner := bufio.NewScanner(stdErr) go func() { for stdErrScanner.Scan() { - fmt.Printf("%s\n", stdErrScanner.Text()) + + txt := stdErrScanner.Text() + + if !strings.Contains(txt, "no buildable Go source files in") { + fmt.Printf("%s\n", txt) + } } }()