/******************************************************************************** Advent of Code 2024 - day-01 ********************************************************************************/ package main import ( "embed" "flag" "fmt" "log" "github.com/onyx-and-iris/aoc2024/day-01/internal/one" "github.com/onyx-and-iris/aoc2024/day-01/internal/two" ) //go:embed testdata var files embed.FS func main() { filename := flag.String("f", "input.txt", "input file") flag.Parse() data, err := files.ReadFile(fmt.Sprintf("testdata/%s", *filename)) if err != nil { log.Fatal(err) } val, err := one.Solve(data) if err != nil { log.Fatal(err) } fmt.Printf("solution one: %d\n", val) val, err = two.Solve(data) if err != nil { log.Fatal(err) } fmt.Printf("solution two: %d\n", val) }