From ba1f64a73141ed0c29447960ccca64fac77ae1f5 Mon Sep 17 00:00:00 2001 From: Quentin Perez Date: Wed, 14 Dec 2016 11:08:51 +0100 Subject: [PATCH] don't print error when debug=false --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 89f157e..3907e1b 100644 --- a/main.go +++ b/main.go @@ -43,9 +43,11 @@ func main() { templateDir = parts[1] break case "debug": - if parts[1] == "true" { + switch strings.ToLower(parts[1]) { + case "true", "t": debug = true - } else { + case "false", "f": + default: log.Printf("Err: invalid value for debug: %q", parts[1]) } break