🌅
This commit is contained in:
88
main.go
Normal file
88
main.go
Normal file
@@ -0,0 +1,88 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/acw/advent2022/solutions/day1"
|
||||
"github.com/acw/advent2022/solutions/day10"
|
||||
"github.com/acw/advent2022/solutions/day11"
|
||||
"github.com/acw/advent2022/solutions/day12"
|
||||
"github.com/acw/advent2022/solutions/day13"
|
||||
"github.com/acw/advent2022/solutions/day14"
|
||||
"github.com/acw/advent2022/solutions/day15"
|
||||
"github.com/acw/advent2022/solutions/day16"
|
||||
"github.com/acw/advent2022/solutions/day17"
|
||||
"github.com/acw/advent2022/solutions/day18"
|
||||
"github.com/acw/advent2022/solutions/day19"
|
||||
"github.com/acw/advent2022/solutions/day2"
|
||||
"github.com/acw/advent2022/solutions/day20"
|
||||
"github.com/acw/advent2022/solutions/day21"
|
||||
"github.com/acw/advent2022/solutions/day22"
|
||||
"github.com/acw/advent2022/solutions/day23"
|
||||
"github.com/acw/advent2022/solutions/day3"
|
||||
"github.com/acw/advent2022/solutions/day4"
|
||||
"github.com/acw/advent2022/solutions/day5"
|
||||
"github.com/acw/advent2022/solutions/day6"
|
||||
"github.com/acw/advent2022/solutions/day7"
|
||||
"github.com/acw/advent2022/solutions/day8"
|
||||
"github.com/acw/advent2022/solutions/day9"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) < 3 {
|
||||
fmt.Println("USAGE: advent2022 [dayNN] [input]...")
|
||||
return
|
||||
}
|
||||
|
||||
switch os.Args[1] {
|
||||
case "day1":
|
||||
day1.Run(os.Args[2])
|
||||
case "day2":
|
||||
day2.Run(os.Args[2])
|
||||
case "day3":
|
||||
day3.Run(os.Args[2])
|
||||
case "day4":
|
||||
day4.Run(os.Args[2])
|
||||
case "day5":
|
||||
day5.Run(os.Args[2], os.Args[2])
|
||||
case "day6":
|
||||
day6.Run(os.Args[2], os.Args[2])
|
||||
case "day7":
|
||||
day7.Run(os.Args[2])
|
||||
case "day8":
|
||||
day8.Run(os.Args[2])
|
||||
case "day9":
|
||||
day9.Run(os.Args[2], os.Args[2])
|
||||
case "day10":
|
||||
day10.Run(os.Args[2])
|
||||
case "day11":
|
||||
day11.Run(os.Args[2])
|
||||
case "day12":
|
||||
day12.Run(os.Args[2])
|
||||
case "day13":
|
||||
day13.Run(os.Args[2])
|
||||
case "day14":
|
||||
day14.Run(os.Args[2])
|
||||
case "day15":
|
||||
day15.Run(os.Args[2], os.Args[3], os.Args[4])
|
||||
case "day16":
|
||||
day16.Run(os.Args[2])
|
||||
case "day17":
|
||||
day17.Run(os.Args[2], os.Args[3])
|
||||
case "day18":
|
||||
day18.Run(os.Args[2])
|
||||
case "day19":
|
||||
day19.Run(os.Args[2])
|
||||
case "day20":
|
||||
day20.Run(os.Args[2], os.Args[3], os.Args[4])
|
||||
case "day21":
|
||||
day21.Run(os.Args[2])
|
||||
case "day22":
|
||||
day22.Run(os.Args[2])
|
||||
case "day23":
|
||||
day23.Run(os.Args[2])
|
||||
default:
|
||||
fmt.Println("PANIC! Unknown day.")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user