aoc2024/day-01/main.go

32 lines
667 B
Go
Raw Normal View History

2024-12-01 17:50:02 +00:00
/********************************************************************************
Advent of Code 2024 - day-01
********************************************************************************/
package main
import (
2024-12-01 23:12:34 +00:00
"flag"
2024-12-01 17:50:02 +00:00
"fmt"
"log"
"github.com/onyx-and-iris/aoc2024/day-01/internal/one"
"github.com/onyx-and-iris/aoc2024/day-01/internal/two"
)
func main() {
2024-12-01 23:12:34 +00:00
filename := flag.String("f", "input.txt", "input file")
flag.Parse()
val, err := one.Solve(*filename)
2024-12-01 17:50:02 +00:00
if err != nil {
log.Fatal(err)
}
fmt.Printf("solution one: %d\n", val)
2024-12-01 23:12:34 +00:00
val, err = two.Solve(*filename)
2024-12-01 17:50:02 +00:00
if err != nil {
log.Fatal(err)
}
fmt.Printf("solution two: %d\n", val)
}