feat: implement method for reading file line at a time
This commit is contained in:
+2
-2
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user