From 452911586df6115a7c8deadee87fe5d97a7fe36f Mon Sep 17 00:00:00 2001 From: Levi Durfee Date: Tue, 6 Jan 2026 18:33:28 -0500 Subject: Add urfave cli --- cmd/goaes/main.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cmd/goaes/main.go (limited to 'cmd/goaes/main.go') diff --git a/cmd/goaes/main.go b/cmd/goaes/main.go new file mode 100644 index 0000000..30f1d1d --- /dev/null +++ b/cmd/goaes/main.go @@ -0,0 +1,32 @@ +package main + +import ( + "context" + "log" + "os" + + "github.com/nerdsec/goaes/cmd/goaes/commands" + "github.com/urfave/cli/v3" +) + +func main() { + cmd := &cli.Command{ + Name: "goaes", + Usage: "Simple AES encryption built with Go", + Action: func(ctx context.Context, cmd *cli.Command) error { + return cli.DefaultShowRootCommandHelp(cmd) + }, + Commands: []*cli.Command{ + { + Name: "generate", + Aliases: []string{"g"}, + Usage: "Generate a base64 encoded key", + Action: commands.Generate, + }, + }, + } + + if err := cmd.Run(context.Background(), os.Args); err != nil { + log.Fatal(err) + } +} -- cgit v1.2.3