X-Git-Url: https://fbox.kageds.com/gitweb/adventofcode.git/blobdiff_plain/87786ac5b1569a9cc60680549ed9539d809d4864..56571eadf0ea7e737cec64c0691098ba70f77979:/2023/go/main.go?ds=inline diff --git a/2023/go/main.go b/2023/go/main.go index ab4582a..0f19aeb 100644 --- a/2023/go/main.go +++ b/2023/go/main.go @@ -8,6 +8,9 @@ import ( // "time" "adventofcode2023/utils" "adventofcode2023/day01" + "adventofcode2023/day02" + "adventofcode2023/day03" + "adventofcode2023/day04" ) // Usage: go run main.go // assumes input is in day/input.txt @@ -19,6 +22,15 @@ func main() { case 1: fmt.Printf("part 1: %d\n", day01.Part1(utils.Readfile(d))) fmt.Printf("part 2: %d\n", day01.Part2(utils.Readfile(d))) + case 2: + fmt.Printf("part 1: %d\n", day02.Part1(utils.Readfile(d))) + fmt.Printf("part 2: %d\n", day02.Part2(utils.Readfile(d))) + case 3: + fmt.Printf("part 1: %d\n", day03.Part1(utils.Readfile(d))) + fmt.Printf("part 2: %d\n", day03.Part2(utils.Readfile(d))) + case 4: + fmt.Printf("part 1: %d\n", day04.Part1(utils.Readfile(d))) + fmt.Printf("part 2: %d\n", day04.Part2(utils.Readfile(d))) default: panic(fmt.Errorf("no such day: %d", d)) } @@ -26,7 +38,7 @@ func main() { // Reads day from os.Args. func day() int { - latest := 0 + latest := 3 if len(os.Args) == 1 { return latest } @@ -79,5 +91,6 @@ func TestPart2(t *testing.T) { } `, n)) fmt.Printf("wrote day%02d/day%02d_test.go\n", n, n) + utils.GenInputFile(n) } \ No newline at end of file