Solutions for the 2019 Advent of Code
This project makes use of Go 1.13.
go mod download
go test ./...
To run a solution, use the problem name followed by the path to an input file.
For example, to run problem 2a:
$ go run ./main.go 2a ./day2/input.txt
Answer: 9633
Took 999.4µs
A generator program is included in gen/problem.go
that makes templates for each day. For
example, go run gen/problem.go 9 a
will generate the following files:
challenge/day9/a.go
: The main problem implementation, containing a cobra commandA
and the implementationfunc a(*challenge.Input) int
challenge/day9/a_test.go
: A basic test templatechallenge/day9/input.txt
: The challenge input
I don't yet have a way to register the cobra command in main.go
automatically.
These solutions are licensed under the MIT License.
See LICENSE for details.