diff --git a/2024/01/main.go b/2024/01/main.go index baddb7b..e933f2d 100644 --- a/2024/01/main.go +++ b/2024/01/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2024/helper" "fmt" "sort" + + "aoc/helper" ) type list struct { diff --git a/2024/02/main.go b/2024/02/main.go index ae2a1f8..adcaa28 100644 --- a/2024/02/main.go +++ b/2024/02/main.go @@ -1,9 +1,10 @@ package main import ( - "aoc2024/helper" "fmt" "sort" + + "aoc/helper" ) type reports []report diff --git a/2024/go.mod b/2024/go.mod deleted file mode 100644 index 26cc35c..0000000 --- a/2024/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module aoc2024 - -go 1.23.3 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5904fa3 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module aoc + +go 1.23.3 diff --git a/2024/helper/input.go b/helper/input.go similarity index 91% rename from 2024/helper/input.go rename to helper/input.go index fe70669..43ec37c 100644 --- a/2024/helper/input.go +++ b/helper/input.go @@ -11,7 +11,7 @@ import ( const INPUT_FILE = "input" -func GetLines() *bufio.Scanner { +func getLines() *bufio.Scanner { wd, err := os.Getwd() filePath := filepath.Join(wd, INPUT_FILE) @@ -24,7 +24,7 @@ func GetLines() *bufio.Scanner { } func ReadLinesTwoIntSlices() (list_a []int, list_b []int) { - scanner := GetLines() + scanner := getLines() for scanner.Scan() { parts := strings.Fields(scanner.Text()) @@ -39,7 +39,7 @@ func ReadLinesTwoIntSlices() (list_a []int, list_b []int) { } func ReadLinesToIntSlices() (lines [][]int) { - scanner := GetLines() + scanner := getLines() for scanner.Scan() { string_line := strings.Fields(scanner.Text()) int_line := make([]int, len(string_line)) diff --git a/2024/helper/math.go b/helper/math.go similarity index 100% rename from 2024/helper/math.go rename to helper/math.go