aoc2019

command module
v0.0.0-...-f630813 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2020 License: MIT Imports: 30 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL