summaryrefslogtreecommitdiff
path: root/chomp.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-06-07 01:15:37 -0700
committerJeff Carr <[email protected]>2019-06-07 01:15:37 -0700
commit2fcc7947db28b2d48e4fcf71a129f615d1e702b5 (patch)
tree77b06c4509eddf47e0e1a641164df14edc45c51d /chomp.go
parentb56c3fe1f6ecd91c771c8a80cca779f1dc6ace8a (diff)
add a quiet flag and some other fixes
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'chomp.go')
-rw-r--r--chomp.go3
1 files changed, 3 insertions, 0 deletions
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()