This repo contains my solutions to the Advent of Code for 2023 in Golang.
Just install go and compile the binary with the normal go build
or go run .
.
The binary accepts the following actions:
Intended to execute a given solution. It has two arguments, year and day, to locate the intended solution, plus one flag, --example, to pass the example input.
aoc solve 2023 5 --example
To make some task easier, there is a Taskfile.yml
. Simply install this
and run the desired task:
Test all the files
task test-all -- # Other params to go test
Test only one module
task test -- github.com/gowikel/adventofcode-golang/year2023/day01
# This will also work
task test -- ./year2023/day01
Test only one function
task test -- -run TestIsIncluded_WithStep_InsideRangeTarget_Valid
Run the binary
task run -- solve 2023 1 --example
Format code
task fmt
- Pedro Jose Piquero Plaza - gowikel@gmail.com
This project is licensed under the MIT License - see the file for details
The puzzles and its inputs are property of AoC