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()