You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
aoc2020/main.go

48 lines
1.2 KiB

package main // import "git.elis.nu/etu/aoc2020"
import (
"log"
"os"
"git.elis.nu/etu/aoc2020/day01"
"git.elis.nu/etu/aoc2020/day02"
"git.elis.nu/etu/aoc2020/day03"
"git.elis.nu/etu/aoc2020/day04"
"git.elis.nu/etu/aoc2020/day05"
"git.elis.nu/etu/aoc2020/day06"
"git.elis.nu/etu/aoc2020/day07"
"git.elis.nu/etu/aoc2020/day08"
"git.elis.nu/etu/aoc2020/utils"
)
func main() {
if len(os.Args) != 3 {
log.Fatal("Usage: Missing arguments: [dayXX] [input].txt")
}
switch os.Args[1] {
case "day01":
utils.Perf("2020-12-01", day01.ParseFile, day01.Solve1, day01.Solve2)
case "day02":
utils.Perf("2020-12-02", day02.ParseFile, day02.Solve1, day02.Solve2)
case "day03":
utils.Perf("2020-12-03", day03.ParseFile, day03.Solve1, day03.Solve2)
case "day04":
utils.Perf("2020-12-04", day04.ParseFile, day04.Solve1, day04.Solve2)
case "day05":
utils.Perf("2020-12-05", day05.ParseFile, day05.Solve1, day05.Solve2)
case "day06":
utils.Perf("2020-12-06", day06.ParseFile, day06.Solve1, day06.Solve2)
case "day07":
utils.Perf("2020-12-07", day07.ParseFile, day07.Solve1, day07.Solve2)
case "day08":
utils.Perf("2020-12-08", day08.ParseFile, day08.Solve1, day08.Solve2)
}
}