Skip to content

nlowe/aoc2019

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2019

Coverage Status Go Report Card License

Solutions for the 2019 Advent of Code

Building

This project makes use of Go 1.13.

go mod download
go test ./...

Running the Solutions

To run a solution, use the problem name followed by the path to an input file.

For example, to run problem 2a:

$ go run ./main.go 2a ./day2/input.txt
Answer: 9633
Took 999.4µs

Adding New Solutions

A generator program is included in gen/problem.go that makes templates for each day. For example, go run gen/problem.go 9 a will generate the following files:

  • challenge/day9/a.go: The main problem implementation, containing a cobra command A and the implementation func a(*challenge.Input) int
  • challenge/day9/a_test.go: A basic test template
  • challenge/day9/input.txt: The challenge input

I don't yet have a way to register the cobra command in main.go automatically.

License

These solutions are licensed under the MIT License.

See LICENSE for details.

About

Advent of Code 2019 Solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages