Move cli to separate package

This commit is contained in:
9seconds
2021-03-11 05:50:04 +03:00
parent 1a02511afe
commit 6b28488fbd
7 changed files with 114 additions and 58 deletions
+2 -7
View File
@@ -4,21 +4,16 @@ import (
"math/rand"
"time"
"github.com/9seconds/mtg/v2/cli"
"github.com/alecthomas/kong"
)
var version = "dev" // has to be set by ldflags
type CLI struct {
GenerateSecret cliCommandGenerateSecret `cmd help:"Generate new proxy secret"` // nolint: govet
Access cliCommandAccess `cmd help:"Print access information."` // nolint: govet
Version kong.VersionFlag `help:"Print version."`
}
func main() {
rand.Seed(time.Now().UTC().UnixNano())
cli := &CLI{}
cli := &cli.CLI{}
ctx := kong.Parse(cli, kong.Vars{
"domain_front": "amazonaws.com",
"version": version,