This is my repository for solving the puzzles from Advent of Code 2024.
This year, I decided to give Go a spin to get more familiar with the language. It might feel like I've gone a bit overboard with the structure, almost making it too "corporate," but I wanted it to feel like a real project.
-
Add a
.env
file at the root of the project. -
Add the following line to the
.env
file:AOC_SESSION=XXX
Replace
XXX
with the session cookie from the Advent of Code website.
Adjust inside main.go
what day it should run.
Get the results with: go run main.go
To ensure consistent code quality and style, here are the tools I'm using:
Formats the code according to Go's standards.
Run it with: go fmt ./...
Performs static analysis to catch common mistakes.
Run it with: go vet ./...
Provides linting to enforce Go code style.
Install it with: go install golang.org/x/lint/golint@latest
Run it with: golint ./...
Offers advanced linting and catches performance and correctness issues.
Install it with: go install honnef.co/go/tools/cmd/staticcheck@latest
Run it with: staticcheck ./...
Run all tests with: go test ./...