package main import ( "fmt" "os" "shillerben.com/gitlab/shillerben/projecteuler-go/pe26" "shillerben.com/gitlab/shillerben/projecteuler-go/pe27" "shillerben.com/gitlab/shillerben/projecteuler-go/pe28" ) var solve_funcs = map[string]func([]string){ "26": pe26.Solve, "27": pe27.Solve, "28": pe28.Solve, } func main() { if len(os.Args) < 2 { fmt.Println("usage: projecteuler ") return } problem_number := os.Args[1] var problem_args []string if len(os.Args) > 2 { problem_args = os.Args[2:] } solve_funcs[problem_number](problem_args) }