From 28ea3ff6a16335ce12afc42bf25e789391448239 Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 9 Jun 2022 13:17:51 -0500 Subject: [PATCH] Handle an empty argument This makes it slightly easier to adjust VSCode's launch.json to hop around debugging different days. Not much, but a little. And every little bit helps! --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9e379f2..b09ddb0 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ var dayMap = []day{ func main() { arg := strconv.Itoa(len(dayMap)) - if len(os.Args) > 1 { + if len(os.Args) > 1 && len(os.Args[1]) > 0 { arg = os.Args[1] } if strings.ToLower(arg) == "all" {