summaryrefslogtreecommitdiff
path: root/cmd/aocli/main.go
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-02-26 17:06:43 +0100
committerMike Vink <mike1994vink@gmail.com>2023-02-26 17:06:43 +0100
commit2a0875cf1f0b726678831cf9e8951b3363f4578d (patch)
treeb65e86e6000d979e84853d429a294b910387a405 /cmd/aocli/main.go
parent9dbdf08cb814a32ebb27d200391af83c6f2a7ff5 (diff)
start making a cli
Diffstat (limited to 'cmd/aocli/main.go')
-rw-r--r--cmd/aocli/main.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmd/aocli/main.go b/cmd/aocli/main.go
new file mode 100644
index 0000000..357b25d
--- /dev/null
+++ b/cmd/aocli/main.go
@@ -0,0 +1,24 @@
+package main
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/spf13/cobra"
+)
+
+var rootCmd = &cobra.Command{
+ Use: "aocli [command]",
+ Short: "AOCLI is a CLI for running Advent of Code solvers and generating boilerplate code",
+}
+
+func init() {
+ rootCmd.AddCommand(genCmd)
+}
+
+func main() {
+ if err := rootCmd.Execute(); err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+}