This is set up as a Visual Studio Code devcontainer, to make it easy to set up the Go environment.
- Clone repo
- Open in Visual Studio code
- Allow it to establish a 'Dev Container' using the Dev Container extension (which you'll be prompted to install if not already present)
- It'll take a few minutes to create the container.
- Bring up a terminal in the container (Terminal->New Container)
- Run
go run test.go
- You should see a message confirming that your Go container is working
- Log into Advent of Code in a browser and extract the session cookie.
- Place it in the
.env
file, based on.env.sample
.
- Inside the dev container, run
./setup-day.sh <year> <day>
- This will fetch the assignment details and input, into
<year>/<day>
and set up a basic Go skeleton for the day
- This will fetch the assignment details and input, into
- To run the code for a part for a day:
cd <year>/<day>
make <part>
(e.g.make 1
)
./test-all.sh <year>