Solutions in GO
- Run the current day:
go run .
- Run a specific day:
go run . --day=<day>
e.g.go run . --day=6
- Run a specific part:
go run . --part=<1,2>
e.g.go run . --day=2 --part=2
- Run a different input:
go run . --source=<name>
e.g.go run . --day=2 --part=2 --source=example
- There are no default values for function parameters
- string to int conversion requieres explicit
strconv.Atoi
math.Abs
is only implemented for floats- The go compiler has no option to cool it with unused variables. You need to comment out all the code defining the variable, then comment out all the imports... or you define
func UNUSED(x ...interface{}) {}
and hand all variables you currently don't need to this do-nothing function. Great design, guys.