summaryrefslogtreecommitdiff
path: root/cmd
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
parent9dbdf08cb814a32ebb27d200391af83c6f2a7ff5 (diff)
start making a cli
Diffstat (limited to 'cmd')
-rw-r--r--cmd/aocli/gen.go15
-rw-r--r--cmd/aocli/main.go24
2 files changed, 39 insertions, 0 deletions
diff --git a/cmd/aocli/gen.go b/cmd/aocli/gen.go
new file mode 100644
index 0000000..c8251a6
--- /dev/null
+++ b/cmd/aocli/gen.go
@@ -0,0 +1,15 @@
+package main
+
+import (
+ "fmt"
+
+ "github.com/spf13/cobra"
+)
+
+var genCmd = &cobra.Command{
+ Use: "gen",
+ Short: "Generate a new key pair",
+ Run: func(cmd *cobra.Command, args []string) {
+ fmt.Println(args)
+ },
+}
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)
+ }
+}