-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
70 lines (56 loc) · 1.77 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package main
import (
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day01"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day02"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day03"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day04"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day05"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day06"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day07"
"gitlab.com/frankvanmeurs/redesigned-chainsaw/day08"
"go.uber.org/zap"
)
var logger *zap.Logger
func main() {
var err error
logger, err = zap.NewDevelopment()
if err != nil {
panic(err)
}
zap.ReplaceGlobals(logger)
defer func(logger *zap.Logger) {
_ = logger.Sync()
}(logger)
err = day01.Solve()
if err != nil {
logger.Error("Something went wrong while solving day one", zap.String("message", err.Error()))
}
err = day02.Solve()
if err != nil {
logger.Error("Something went wrong while solving day two", zap.String("message", err.Error()))
}
err = day03.Solve()
if err != nil {
logger.Error("Something went wrong while solving day three", zap.String("message", err.Error()))
}
err = day04.Solve()
if err != nil {
logger.Error("Something went wrong while solving day four", zap.String("message", err.Error()))
}
err = day05.Solve()
if err != nil {
logger.Error("Something went wrong while solving day five", zap.String("message", err.Error()))
}
err = day06.Solve()
if err != nil {
logger.Error("Something went wrong while solving day six", zap.String("message", err.Error()))
}
err = day07.Solve()
if err != nil {
logger.Error("Something went wrong while solving day seven", zap.String("message", err.Error()))
}
err = day08.Solve()
if err != nil {
logger.Error("Something went wrong while solving day eight", zap.String("message", err.Error()))
}
}