A lightweight execution environment for the Advent of Code challenges written in Go.
Day | Part 1 | Part 2 |
---|---|---|
Day 1 | ⭐ | ⭐ |
Day 2 | ⭐ | ⭐ |
Day 3 | ⭐ | ⭐ |
Day 4 | ⭐ | ⭐ |
Day 5 | ⭐ | ⭐ |
Day 6 | ⭐ | ⭐ |
Day 7 | ⭐ | ⭐ |
Day 8 | ⭐ | ⭐ |
Day 9 | ⭐ | ⭐ |
Day 10 | ⭐ | ⭐ |
Day 11 | ⭐ | ⭐ |
Day 12 | ⭐ | ⭐ |
Day 13 | ⭐ | ⭐ |
Day 14 | ⭐ | ⭐ |
Day 15 | ⭐ | ⭐ |
Day 16 | ⭐ | ⭐ |
Day 17 | ⭐ | ⭐ |
Day 18 | ⭐ | ⭐ |
Day 19 | ⭐ | ⭐ |
Day 20 | ⭐ | ⭐ |
Day 21 | ⭐ | ⭐ |
Day 22 | ⭐ | ⭐ |
Day 23 | ⭐ | ⭐ |
Day 24 | ⭐ | ⭐ |
Day 25 | ⭐ | ⭐ |
In the following section, I'll show you how to set up and run the environment for the challenges.
Make sure you have Go >= 1.21.4 installed.
git clone https://github.com/wlchs/aoc23
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 test
Alternatively, you can also run the command from the project root.
go test ./days/day_xx/
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
--day
flag must be set to specify which day's solution should run - the
--input
flag specifies the path of the file containing the actual input - optionally, you can add the
--mode
flag to run one part of the daily challenge, accepted values are 1 and 2
And now the complete command:
./advent_of_code_go_template --day x --input path_to_input --mode 1
# or
go run . --day x --input path_to_input --mode 1
If you'd like to contribute to the project, open an issue or a pull request!