Skip to content

Commit f0db0c3

Browse files
committed
puzzles/solutions: Fix doc
1 parent 7722dd8 commit f0db0c3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

puzzles/solutions/doc.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
// Package declares common interface for puzzle solutions and functionality for register and run them.
2-
package solutions
3-
2+
//
43
// Each solution should implement `Solver` interface, be implemented udnder separate package and contain `init()`
54
// function that will register that solution in list of all solvers.
6-
5+
//
6+
// Example:
7+
//
78
// type solver struct {
89
// name string
910
// }
1011
//
1112
// func init() {
12-
// const puzzleName = "day01"
13+
// puzzleName, err := solutions.MakeName("2019", "day01")
14+
// if err != nil {
15+
// panic(err)
16+
// }
1317
// puzzles.Register(puzzleName, solver{
1418
// name: puzzleName,
1519
// })
1620
// }
17-
21+
//
1822
// Then to register solution in the list of all solutions: make a blank import of package with puzzle solution
1923
// at main.go
2024
//
21-
// _ "github.com/oleg-balunenko/advent-of-code/puzzles/solutions/day01"
25+
// import _ "github.com/oleg-balunenko/advent-of-code/puzzles/solutions/day01"
26+
package solutions

0 commit comments

Comments
 (0)