diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9847eb4..1475698 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,8 @@ jobs: run: go build -v ./day01/*.go - name: Build day two run: go build -v ./day02/*.go + - name: Run day one + run: go run -v ./day01/*.go - name: Display Go version run: go version - name: List files in the repository diff --git a/day01/inputs b/day01/inputs new file mode 120000 index 0000000..a80bb2b --- /dev/null +++ b/day01/inputs @@ -0,0 +1 @@ +../inputs \ No newline at end of file diff --git a/day01/trebuchet.go b/day01/trebuchet.go index f3b5df3..d62f968 100644 --- a/day01/trebuchet.go +++ b/day01/trebuchet.go @@ -109,7 +109,7 @@ func CombineIndexes(s string) int { } func main() { - file, err := os.Open("input") + file, err := os.Open("./inputs/day01_input") check(err) defer file.Close() diff --git a/day02/inputs b/day02/inputs new file mode 120000 index 0000000..a80bb2b --- /dev/null +++ b/day02/inputs @@ -0,0 +1 @@ +../inputs \ No newline at end of file diff --git a/day02/lottacubes.go b/day02/lottacubes.go index ccbd344..b46856c 100644 --- a/day02/lottacubes.go +++ b/day02/lottacubes.go @@ -140,7 +140,7 @@ func PrintAndWait[T any](x T) { } func main() { - file, err := os.Open("input") + file, err := os.Open("./inputs/day02_input") check(err) defer file.Close() diff --git a/day01/input b/inputs/day01_input similarity index 100% rename from day01/input rename to inputs/day01_input diff --git a/day02/input b/inputs/day02_input similarity index 100% rename from day02/input rename to inputs/day02_input