A lightweight execution environment for the advent of code challenges written in Go.
Before submitting a solution, you can test the algorithms with the template input. Navigate to the day you want to check and run the following command:
go testAlternatively, you can also run the command from the project root.
go test ./year/day_xx/The input files are located in the inputs folder, which are gitignored. The file names are in the following format: day_xx.txt. The input files are not included in the repository, you have to download them from the advent of code website, and are generated specific to the user.
You can compile code and run with the actual input if all the tests pass. For this, first, run this command:
go build .To run the solution, you need to provide a few extra arguments.
- the
--yearflag must be set to specify which year's solution should run - the
--dayflag must be set to specify which day's solution should run - the
--inputflag specifies the path of the file containing the actual input - optionally, you can add the
--modeflag to run one part of the daily challenge, accepted values are 1 and 2
And now the complete command:
go run . --year y --day x --input path_to_input --mode 1