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!
This commit is contained in:
2022-06-09 13:17:51 -05:00
parent bc8ebae440
commit 28ea3ff6a1

View File

@ -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" {