Documentation ¶
Overview ¶
Package aoc contains functionalities related to Advent of Code.
Index ¶
Constants ¶
View Source
const FirstYear = Year(2015)
FirstYear is the year when the first Advent of Code was released.
Variables ¶
View Source
var Timezone = time.FixedZone("EST/UTC-5", -5*60*60)
Timezone is when Eric Wastl unlocks the Advent of Code puzzles.
Functions ¶
Types ¶
type AdventYears ¶ added in v0.4.3
type AdventYears []Year
AdventYears represents a collection of Advent of Code years.
func Years ¶
func Years() AdventYears
Years returns all released AoCs years in ascending order. It should be noted that this uses the local time of the user's machine. Which when messed with could lead to an incorrect list of AoC years.
func (AdventYears) FirstYearDir ¶ added in v0.4.3
func (years AdventYears) FirstYearDir(cwd string) (Year, string, error)
FirstYearDir tries to find and return a path of the first aoc year where the year exists as a dir in the given cwd.
func (AdventYears) Len ¶ added in v0.4.3
func (years AdventYears) Len() int
func (AdventYears) Less ¶ added in v0.4.3
func (years AdventYears) Less(i, j int) bool
func (AdventYears) Swap ¶ added in v0.4.3
func (years AdventYears) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.