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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址