aoc2024/day-01/cmd/cli/main.go
onyx-and-iris d05828154e move flag parsing into /cmd/cli/main.go
solves issue redefined flag when running benchmarks
2024-12-02 02:04:35 +00:00

30 lines
564 B
Go

/********************************************************************************
Advent of Code 2024 - day-01
********************************************************************************/
package main
import (
"embed"
"flag"
"fmt"
"log"
problems "github.com/onyx-and-iris/aoc2024/day-01"
)
//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)
}
problems.Solve(data)
}