Advent of Code 2021, experiment in learning Go

Overview

aoc_2021

Advent of Code 2021, experiment in learning Go

To run, open a terminal in the root folder of the project and run with

  1. go run . <day to run> <optional relative input path>
  2. go build . followed by .\ aoc_2021.exe <day to run> <optional relative input path>

You can run this code with your own input file. the file path needs to be relative to the root of the project.

The project contains unit tests based on my input files. This allows you to make changes to the files and validate functional correctness.

DISCLAIMERS:

  1. This is my first attempt dabbling in Go. As such, please do not use it as an example of idiomatic go. It is not. Feedback would be most welcome.
  2. I omitted error handling, since it is not so relevant for the scope of this project

TODO: change the file handling to be able to run in a github action as well. Currently the way file paths are constructed fails in this context

You might also like...
Advent of code 2021 solutions by: me :)

Advent of code 2021 These are my solutions for the advent of code 2021 event. My idea is to solve all the problems in go, but I may use another langua

A little repository for my Advent of Code 2021 solutions in Go

Advent of Code 2021 What's this repo all about? Well, this is a collection of code written in Golang to solve the daily problems presented in Advent o

Advent of Code 2021 solutions using Go 1.18 Generics

advent-of-code-2021 Here are my solutions for Advent of Code 2021. This year, I chose to write my solutions using Go 1.18 with generics (by building t

My solutions for Advent of Code 2021.

My solutions for Advent of Code 2021 in go. The solution and input data (i.e. my custom input data) for day XX is contained in the subdirectory dayXX.

🎅 A programming language for Advent of Code.

🎅 Adventlang My blog post: Designing a Programming Language for Advent of Code A strongly typed but highly dynamic programming language interpreter w

Personal Advent of Code challenges to force me to learn Go.

Advent of Code 2021 A list of 31 challenges I am completing using Golang for the month of December. Day 1: Quicksort Variables Constants Lists Comment

Advent of code solutions in Golang

Advent of Code go solutions This repo contains my solutions in Golang for advent of code (P.S: I am using this opportunity to learn new language most

A non-go engineer tries to write Go to solve Advent of Code

Wherein an engineer (who primarily uses Kotlin, Java, Scala and C#) tries to teach themselves Go by solving Advent of Code challenges. It's... not pre

Advent of code — Programming Christmas Puzzles

Advent-of-code-2021 Advent of code — Programming Christmas Puzzles ★ - both the first and the second parts are solved ☆ - only the first part is solve

Owner
Jonathan den Herder
Jonathan den Herder
🎄 My code for the Advent of Code of year 2021 in Go.

Advent of Code 2021 This repository contains all code that I wrote for the Advent of Code 2021. This year I chose to try and learn Go. Enjoy! Built wi

Nick van Ravenzwaaij 0 Dec 9, 2021
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent of Code 2021 Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved

Kemal Ogun Isik 0 Dec 2, 2021
Zach Howell 0 Jan 4, 2022
Advent of Code 2021 Solutions

Advent of Code 2021 Solutions for the 2021 Advent of Code Building This project makes use of Go 1.17. go mod download go test ./... Running the Soluti

Nathan Lowe 7 Jan 7, 2022
Finished snippets I did for Advent of Code 2021.

Advent of Code 2021 This repository includes my Go code for the Advent of Code 2021. If you want to solve the puzzles yourself first, do so, then look

Mario Liebisch 0 Dec 25, 2021
Advent of Code 2021 - Time to learn Go

aoc2021 Advent of Code 2021 - Time to learn Go Will contain my solutions for aoc2021, so avoid reading the files in .src/aoc2021/ unless you want spoi

null 1 Dec 22, 2021
Advent of Code 2021, this time in Go

Go Lang Notes Advent of Code Day 3 The distinction between chars and bytes is a bit annoying. I got tripped up by doing: int(str[pos]) which gives yo

Dan Vanderkam 15 Apr 14, 2022
My solutions for 2021's Advent of Code

Advent of Code 2021 These are my solutions to this year's Advent of Code. I used it as an excuse to practice with a language which I'm not yet very fa

Merlijn Visser 1 Dec 27, 2021
Advent of Code 2021 (Go)

Advent of Code 2021 (Go) This project includes an implementation of the Advent of Code 2021 problems, implemented in Go. These are ports from my C# so

Brad Wilson 1 Dec 18, 2021
Solutions to Advent-of-Code 2021, in Go.

?? advent-of-code-2021 ?? Solutions to 2021 Advent of code. Summary Advent of Code is an annual advent-calendar of programming puzzles. Here are my 20

James Cockbain 2 Jan 3, 2022