mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 11:44:02 +03:00
Move cli to separate package
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user