From 37850e8350ddfc08b4ec550648e4514addfbac47 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 25 Feb 2019 12:59:57 +1030 Subject: [PATCH] revid-cli: initialising config.Output slice when no outputs are defined so that a default output can still be set --- cmd/revid-cli/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index 6ca6ba68..05de1acf 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -184,6 +184,10 @@ func handleFlags() revid.Config { log.Log(logger.Error, pkg+"bad input codec argument") } + if len(outputs) == 0 { + cfg.Outputs = make([]uint8, 1) + } + for _, o := range outputs { switch o { case "File":