https://github.com/jjj120/AdventOfCode
These are my solutions for the advent of code in go
https://github.com/jjj120/AdventOfCode
advent-of-code advent-of-code-2023 advent-of-code-go go golang
Last synced: 2 months ago
JSON representation
These are my solutions for the advent of code in go
- Host: GitHub
- URL: https://github.com/jjj120/AdventOfCode
- Owner: jjj120
- Created: 2023-12-01T07:49:06.000Z (almost 2 years ago)
- Default Branch: 2024
- Last Pushed: 2024-12-25T07:40:45.000Z (11 months ago)
- Last Synced: 2025-09-20T01:55:05.009Z (2 months ago)
- Topics: advent-of-code, advent-of-code-2023, advent-of-code-go, go, golang
- Language: Go
- Homepage:
- Size: 1.75 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- really-awesome-advent-of-code - jjj120/AdventOfCode - commit/jjj120/AdventOfCode/2024) (🎄 2024 AoC Solutions / Solutions)
README
# Advent of Code
These are my solutions for the [advent of code](https://adventofcode.com/) in go. I'm not a go developer, I did the advent to learn go, so don't expect good code. Some of the solutions are inspired by the ones from the [Advent of Code subreddit](https://www.reddit.com/r/adventofcode/), but I tried to do all of it myself.
There are different branches for the differnt years, the current year is the default branch.
## Usage
There is a folder for each day. The input file is the *.in file, the examples to test are in the *.ex files.
To run the code, you need to have go installed. Then you can run the code with `go run .go` in the day's folder.
To run the code for part 1, you have to checkout the right commit because part 2 is added on top and edits the code for part 1.
## Download script
There is a script to copy the template files for the day. You can run it with `./download.sh` to download the template files for the current day. You can also run it with `./download.sh -d ` or `./download.sh --day ` to download the input file for a specific day. To download the input file for a specific year, you can run `./download.sh -y -d ` or `./download.sh --year --day `.
The download script needs a session cookie to download the input file. You can get the session cookie from your browser and save it in a file called `.aocdlconfig` as `{session=}`. The script also depends on `aocdl` which you can install from [github.com/GreenLightning/advent-of-code-downloader/](https://github.com/GreenLightning/advent-of-code-downloader/).
If you want to start a time to automatically download the input when it gets released, specify the `-w` or `--wait` flag. The script will then wait until the input is released and download it. If this option is used, all other options are ignored.