[go: up one dir, main page]

Skip to content

codingcampbell/advent-of-code-2024

Repository files navigation

Advent of Code 2024

My absolute commitment of 2 or 3 days at most, probably. This year, in Go.

Tests status

Getting Started

The puzzles are implemented as a test suite, there is no binary to build.

go test -v

Using your own inputs

  • Set AOC_SESSION_ID to your advent of code session cookie
  • Get your inputs with sync-inputs

E.g.:

go install ./cmd/sync-inputs
env AOC_SESSION_ID=abcdef sync-inputs

You will have to update the test case values in main_test.go

Dev Container

There is a compose.yaml if you prefer to use a container.

  1. Place AOC_SESSION_ID in .env file
  2. Run docker compose up -d
  3. Run docker compose exec app sync-inputs (and update the test cases)
  4. Run docker compose exec app go test -v

There is also a .devcontainer config which will give you a nice test UI in VSCode (if you have installed the Dev Containers extension)