File tree Expand file tree Collapse file tree 5 files changed +31
-25
lines changed
Expand file tree Collapse file tree 5 files changed +31
-25
lines changed Original file line number Diff line number Diff line change 1+ # Opinionated Advent of Code Shared Library
2+
3+ * [ Client] ( ./client )
4+ * [ Scaffolding] ( ./scaffold )
Original file line number Diff line number Diff line change 99>
1010> Source: adventofcode.com
1111
12+ ## Download input file
1213``` go
1314targetDir := fmt.Sprintf (" input/day%02d " , dayNumber)
1415targetFile := fmt.Sprintf (" %s /input" , targetDir)
@@ -43,28 +44,3 @@ if valid {
4344 fmt.Println (" Something is wrong :(" )
4445}
4546```
46-
47- ## Generate file/directory structure from template
48-
49- Note: All file will be rendered with ` .tmpl ` extension
50- and all directory will be created where there is at least
51- one ` .tmpl ` file.
52-
53- ``` go
54- type templateVariables struct {
55- Day int
56- Root string
57- }
58-
59- err := aoc.Scaffold (
60- templateDir,
61- fmt.Sprintf (" days/day%02d " , dayNumber),
62- templateVariables{
63- Day : dayNumber,
64- Root : packageRoot,
65- },
66- )
67- if err != nil {
68- logrus.Errorln (err)
69- }
70- ```
Original file line number Diff line number Diff line change 1+ # Scaffolding
2+
3+ ## Generate file/directory structure from template
4+
5+ Note: All file will be rendered with ` .tmpl ` extension
6+ and all directory will be created where there is at least
7+ one ` .tmpl ` file.
8+
9+ ``` go
10+ type templateVariables struct {
11+ Day int
12+ Root string
13+ }
14+
15+ err := aoc.Scaffold (
16+ templateDir,
17+ fmt.Sprintf (" days/day%02d " , dayNumber),
18+ templateVariables{
19+ Day : dayNumber,
20+ Root : packageRoot,
21+ },
22+ )
23+ if err != nil {
24+ logrus.Errorln (err)
25+ }
26+ ```
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments