1
0
Fork 0
This commit is contained in:
Arthur K. 2026-05-14 20:19:22 +03:00
commit 7cc71fb719
Signed by: wzray
GPG key ID: B97F30FDC4636357
13 changed files with 840 additions and 0 deletions

24
main.go Normal file
View file

@ -0,0 +1,24 @@
package main
import (
"fmt"
"impulse/internal/challenge"
"os"
)
func main() {
configPath, eventsPath := "config.json", "events"
if len(os.Args) == 3 {
configPath, eventsPath = os.Args[1], os.Args[2]
} else if len(os.Args) != 1 {
fmt.Fprintf(os.Stderr, "usage: %s [config.json events]\n", os.Args[0])
os.Exit(2)
}
out, err := challenge.Run(configPath, eventsPath)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Print(out)
}