From 2fcc7947db28b2d48e4fcf71a129f615d1e702b5 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 7 Jun 2019 01:15:37 -0700 Subject: add a quiet flag and some other fixes Signed-off-by: Jeff Carr --- chomp.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chomp.go') diff --git a/chomp.go b/chomp.go index da4fe9e..7af9e3b 100644 --- a/chomp.go +++ b/chomp.go @@ -71,6 +71,9 @@ func Chomp(a interface{}) string { log.Printf("shell.Chomp() FOUND *bytes.Buffer") var tmp *bytes.Buffer tmp = a.(*bytes.Buffer) + if (tmp == nil) { + return "" + } var bytesSplice []byte bytesSplice = tmp.Bytes() -- cgit v1.2.3