Skip to content

Commit 6b8adf2

Browse files
committed
chore: Moving go files to src folder
1 parent ec7d366 commit 6b8adf2

File tree

16 files changed

+11
-100
lines changed

16 files changed

+11
-100
lines changed

day1/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

day2/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

day3/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

day4/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

day5/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/truggeri/adventofcode2024
2+
3+
go 1.23.4

day1/main.go renamed to src/day1/day1.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package main
1+
package day1
22

33
import (
4-
"fmt"
54
"slices"
65
"strconv"
76
"strings"
@@ -10,16 +9,6 @@ import (
109
// This is a bit fragile, but the spec doesn't indicate it will ever change
1110
const INPUT_SEPARATOR = " "
1211

13-
func main() {
14-
input := `3 4
15-
4 3
16-
2 5
17-
1 3
18-
3 9
19-
3 3`
20-
fmt.Println(solve(parseInput(input)))
21-
}
22-
2312
func Solve(input string) uint {
2413
return solve(parseInput(input))
2514
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package day1
22

33
import (
44
"testing"

day2/main.go renamed to src/day2/day2.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package main
1+
package day2
22

33
import (
4-
"fmt"
54
"slices"
65
"strconv"
76
"strings"
@@ -13,17 +12,6 @@ const DELTA_MIN = 1
1312
type level uint
1413
type report []level
1514

16-
func main() {
17-
input := `7 6 4 2 1
18-
1 2 7 8 9
19-
9 7 6 2 1
20-
1 3 2 4 5
21-
8 6 4 4 1
22-
1 3 6 7 9`
23-
solution := Solve(input)
24-
fmt.Println("Solution:", solution)
25-
}
26-
2715
func Solve(input string) uint {
2816
return solve(parseInput(input))
2917
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package day2
22

33
import (
44
"testing"

0 commit comments

Comments
 (0)