refactor: moved a lot of flags & added comments

Comments added to fix the golint errors on exported things need comments
This commit is contained in:
2021-08-02 07:36:35 +01:00
parent 9070806f8d
commit 38d8b51bd5
18 changed files with 330 additions and 248 deletions

View File

@ -4,47 +4,14 @@ import (
"github.com/urfave/cli/v2"
)
const EmptyArgsUsage = " " // Removes "[arguments]" from help. Empty str's are ignored
// Flags
var Status bool
var StatusFlag = &cli.BoolFlag{
Name: "status",
Aliases: []string{"S"},
Value: false,
Usage: "Show app deployment status",
Destination: &Status,
}
var Domain string
var DomainFlag = &cli.StringFlag{
Name: "domain",
Aliases: []string{"d"},
Value: "",
Usage: "Choose a domain name",
Destination: &Domain,
}
var Server string
var ServerFlag = &cli.StringFlag{
Name: "server",
Aliases: []string{"s"},
Value: "",
Usage: "Show apps of a specific server",
Destination: &Server,
}
var AppName string
var AppNameFlag = &cli.StringFlag{
Name: "app-name",
Aliases: []string{"a"},
Value: "",
Usage: "Choose an app name",
Destination: &AppName,
}
// AppName stores the variable from AppNameFlag
// Secrets stores the variable from SecretsFlag
var Secrets bool
// SecretsFlag turns on/off automatically generating secrets
var SecretsFlag = &cli.BoolFlag{
Name: "secrets",
Aliases: []string{"S"},
@ -53,7 +20,10 @@ var SecretsFlag = &cli.BoolFlag{
Destination: &Secrets,
}
// Pass stores the variable from PassFlag
var Pass bool
// PassFlag turns on/off storing generated secrets in pass
var PassFlag = &cli.BoolFlag{
Name: "pass",
Aliases: []string{"P"},
@ -62,138 +32,10 @@ var PassFlag = &cli.BoolFlag{
Destination: &Pass,
}
var Force bool
var ForceFlag = &cli.BoolFlag{
Name: "force",
Value: false,
Destination: &Force,
}
var Update bool
var UpdateFlag = &cli.BoolFlag{
Name: "update",
Value: false,
Destination: &Update,
}
var NoDomainPoll bool
var NoDomainPollFlag = &cli.BoolFlag{
Name: "no-domain-poll",
Value: false,
Destination: &NoDomainPoll,
}
var SkipVersionCheck bool
var SkipVersionCheckFlag = &cli.BoolFlag{
Name: "skip-version-check",
Value: false,
Destination: &SkipVersionCheck,
}
var Volumes bool
var VolumesFlag = &cli.BoolFlag{
Name: "volumes",
Value: false,
Destination: &Volumes,
}
var All bool
var AllFlag = &cli.BoolFlag{
Name: "all",
Aliases: []string{"A"},
Value: false,
Usage: "Generate all secrets",
Destination: &All,
}
var NoTTY bool
var NoTTYFlag = &cli.BoolFlag{
Name: "no-tty",
Value: false,
Destination: &NoTTY,
}
var User string
var UserFlag = &cli.StringFlag{
Name: "user",
Value: "",
Destination: &User,
}
var Env string
var EnvFlag = &cli.PathFlag{
Name: "env",
Aliases: []string{"e"},
Value: "",
Destination: &Env,
}
var Verbose bool
var VerboseFlag = &cli.BoolFlag{
Name: "verbose",
Aliases: []string{"V"},
Value: false,
Destination: &Verbose,
}
var Debug bool
var DebugFlag = &cli.BoolFlag{
Name: "debug",
Aliases: []string{"d"},
Value: false,
Destination: &Debug,
}
var NoPrompt bool
var NoPromptFlag = &cli.BoolFlag{
Name: "no-prompt",
Aliases: []string{"n"},
Value: false,
Destination: &NoPrompt,
}
var Branch string
var BranchFlag = &cli.StringFlag{
Name: "branch",
Aliases: []string{"b"},
Value: "",
Destination: &Branch,
}
var SkipUpdate bool
var SkipUpdateFlag = &cli.BoolFlag{
Name: "skip-update",
Aliases: []string{"U"},
Value: false,
Destination: &SkipUpdate,
}
var SkipCheck bool
var SkipCheckFlag = &cli.BoolFlag{
Name: "skip-check",
Aliases: []string{"C"},
Value: false,
Destination: &SkipCheck,
}
var Stack string
var StackFlag = &cli.StringFlag{
Name: "stack",
Aliases: []string{"s"},
Value: "",
Destination: &Stack,
}
var Type string
var TypeFlag = &cli.StringFlag{
Name: "type",
Aliases: []string{"t"},
Value: "",
Usage: "Show apps of a specific type",
Destination: &Type,
}
// Context is temp
var Context string
// ContextFlag is temp
var ContextFlag = &cli.StringFlag{
Name: "context",
Value: "",