https://github.com/dcoxall/aoc2021
https://github.com/dcoxall/aoc2021
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dcoxall/aoc2021
- Owner: dcoxall
- Created: 2021-12-04T21:04:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-12T00:48:34.000Z (over 4 years ago)
- Last Synced: 2025-01-15T01:03:26.969Z (over 1 year ago)
- Language: Go
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Advent of Code 2021
===================
This years advent of code. Solved with Go just to give me a refresher on the language.
## Structure
Each day is a submodule. The submodules (days) should take an `io.Reader` of the input
and calculate the correct result or return an error.
The main module brings all the days together and provides a basic CLI in which to execute
the solutions against the real input.
## Usage
Executing main.go will output the answer for the most recent solution but supports
re-execution of previous days. It will also output the time taken to calculate the
result.
go run main.go -h
go run main.go -d
#### Install Go
curl -L https://go.dev/dl/go1.17.4.linux-amd64.tar.gz -o go1.17.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.17.4.linux-amd64.tar.gz
rm go1.17.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bash_profile
. ~/.bash_profile
go version