Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cchampou/advent2k21
The famous December challenge, written this year with Go. See https://adventofcode.com/ for information.
https://github.com/cchampou/advent2k21
advent-of-code-2021 golang javascript
Last synced: about 2 months ago
JSON representation
The famous December challenge, written this year with Go. See https://adventofcode.com/ for information.
- Host: GitHub
- URL: https://github.com/cchampou/advent2k21
- Owner: cchampou
- License: mit
- Created: 2021-12-01T07:38:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-09T07:24:06.000Z (about 3 years ago)
- Last Synced: 2024-06-20T22:20:48.894Z (7 months ago)
- Topics: advent-of-code-2021, golang, javascript
- Language: Go
- Homepage: https://adventofcode.com/
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of code 2021. Go edition.
You can read more about the Advent of Code on the [website](https://adventofcode.com/2021/about).
> ️️⚠️ Don't be tempted to use any code from this repo without understanding it
> correctly and eventually cover it with tests. I'm not an advanced Go developer
> and this code is probably not reliant enough.## Motivations
There is no language restriction, so I choose to do it Go this year. Reason
of this choice is that I like the language for being efficient, minimalistic in
its syntax, performant, and strongly typed. I learned a bit about this language,
but I really need to practice, in order to get more used to it.## Code structure
I had no clue how to organize the code when I started the project, so I created 1
executable program in each "day" folder, then I switched to one main executable
at the repos root. The input data are raw pasted in "input" text files, in each
"day" folder.To execute the program, call the root executable with one argument, the number
of the day.```shell
go run . 4
```
*This will execute program for day4, using data in the file `./day4/input`*## Tests
As this project is for educational purpose, without constraints, and as it is not
intended to be used anywhere in production, there is as many tests as I
wish, from none to full coverage.