diff options
Diffstat (limited to 'cmd/goaes/main.go')
| -rw-r--r-- | cmd/goaes/main.go | 32 |
1 files changed, 32 insertions, 0 deletions
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) + } +} |
