Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PartAll means we want to solve both part 1 and part 2. PartAll = 0 // Part1 means we want to solve part 1. Part1 = 1 // Part2 means we want to solve part 2. Part2 = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Day ¶
type Day interface { Part1() (string, error) Part2() (string, error) SetInput(value io.Reader) error }
Day is the interface for daily solutions.
type InputParseError ¶
type InputParseError struct {
Message string
}
InputParseError occurs when something is not implemented.
func (InputParseError) Error ¶
func (e InputParseError) Error() string
type Month ¶
type Month struct {
// contains filtered or unexported fields
}
Month manages daily solvers.
type NoInputError ¶
type NoInputError struct{}
NoInputError occurs when we have no input values.
func (NoInputError) Error ¶
func (e NoInputError) Error() string
type NoSolutionError ¶
type NoSolutionError struct{}
NoSolutionError occurs when we are unable to find a solution.
func (NoSolutionError) Error ¶
func (e NoSolutionError) Error() string
type NotImplementedError ¶
type NotImplementedError struct{}
NotImplementedError occurs when something is not implemented.
func (NotImplementedError) Error ¶
func (e NotImplementedError) Error() string
type Solver ¶
Solver is the main solver. All days and day parts will be called from here.
type UnkownDayError ¶
type UnkownDayError struct {
Day int
}
UnkownDayError occurs when given day is not defined.
func (UnkownDayError) Error ¶
func (e UnkownDayError) Error() string
type UnkownPartError ¶
UnkownPartError occurs when given part is not defined.
func (UnkownPartError) Error ¶
func (e UnkownPartError) Error() string
Click to show internal directories.
Click to hide internal directories.