From 438caf6e06f2e61a0bda9efc5015b80998864ca9 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Mon, 24 Mar 2014 18:17:16 -0700 Subject: [PATCH] beam/examples/beamsh: fix a bug in the log command Docker-DCO-1.1-Signed-off-by: Solomon Hykes (github: shykes) --- beam/examples/beamsh/beamsh.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beam/examples/beamsh/beamsh.go b/beam/examples/beamsh/beamsh.go index 44e3027..c8b0d7e 100644 --- a/beam/examples/beamsh/beamsh.go +++ b/beam/examples/beamsh/beamsh.go @@ -153,7 +153,10 @@ func parseEnv(args []string) ([]string, map[string]string) { func CmdLog(args []string, f *os.File) { defer Debugf("CmdLog done\n") - name := args[1] + var name string + if len(args) > 0 { + name = args[1] + } input := bufio.NewScanner(f) for input.Scan() { line := input.Text()