Change test inputs folder
This commit is contained in:
parent
872f7e629d
commit
c3f708cda2
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
||||
.idea
|
||||
inputs
|
||||
test_inputs
|
||||
inputs_test
|
||||
|
@ -45,7 +45,7 @@ func Day01Part02(isTest bool) int {
|
||||
for j := i + 1; j < arrLen; j += 1 {
|
||||
for k := j + 1; k < arrLen; k += 1 {
|
||||
if values[i]+values[j]+values[k] == 2020 {
|
||||
return (values[i] * values[j] * values[k])
|
||||
return values[i] * values[j] * values[k]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ const DIR = "/home/fernando/GolandProjects/advent-20/"
|
||||
func ReadInput(day string, isTest bool) string {
|
||||
testStr := ""
|
||||
if isTest {
|
||||
testStr = "test_"
|
||||
testStr = "_test"
|
||||
}
|
||||
|
||||
bytes, err := os.ReadFile(DIR + testStr + "inputs/" + day + ".txt")
|
||||
bytes, err := os.ReadFile(DIR + "inputs" + testStr + "/" + day + ".txt")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
panic("Error reading file.")
|
||||
|
Loading…
Reference in New Issue
Block a user