-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
47 lines (45 loc) · 925 Bytes
/
Copy pathmain.go
File metadata and controls
47 lines (45 loc) · 925 Bytes
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
package main
import (
"adventofcode2025/solutions"
"fmt"
"log"
"os"
"time"
)
func main() {
fmt.Println("Advent Of Code time!")
var solution func() error
switch os.Args[1] {
case "1":
solution = solutions.FirstDay
case "2":
solution = solutions.SecondDay
case "3":
solution = solutions.ThirdDay
case "4":
solution = solutions.FourthDay
case "5":
solution = solutions.FifthDay
case "6":
solution = solutions.SixthDay
case "7":
solution = solutions.SeventhDay
case "8":
solution = solutions.EighthDay
case "9":
solution = solutions.NinthDay
case "10":
solution = solutions.TenthDay
case "11":
solution = solutions.EleventhDay
case "12":
solution = solutions.TwelfthDay
default:
log.Fatal("Which day to solve? \nProvide number in run arguments")
}
started := time.Now()
if err := solution(); err != nil {
log.Fatal(err)
}
fmt.Printf("Elapsed: %s\n", time.Since(started))
}