feat: implement method for reading file line at a time

This commit is contained in:
Stevan Freeborn
2025-12-06 12:31:00 -06:00
parent fcd314b5c2
commit 1477c58dce
4 changed files with 80 additions and 9 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import (
)
func SolvePartOne(filePath string) int {
lines := file.ReadLines(filePath)
lines := file.ReadAllLines(filePath)
dial := dial.New()
total := 0
@@ -28,7 +28,7 @@ func SolvePartOne(filePath string) int {
}
func SolvePartTwo(filePath string) int {
lines := file.ReadLines(filePath)
lines := file.ReadAllLines(filePath)
dial := dial.New()
for _, line := range lines {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
)
func Solve(filePath string, numOfCells int) int64 {
input := file.ReadLines(filePath)
input := file.ReadAllLines(filePath)
total := int64(0)
for _, line := range input {