mirror of https://github.com/docker/cli.git
Remove some redundant consts
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
parent
256b9c6011
commit
3acdab83fb
|
@ -14,13 +14,6 @@ import (
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
generatedSecretEntropyBytes = 16
|
|
||||||
generatedSecretBase = 36
|
|
||||||
// floor(log(2^128-1, 36)) + 1
|
|
||||||
maxGeneratedSecretLength = 25
|
|
||||||
)
|
|
||||||
|
|
||||||
type initOptions struct {
|
type initOptions struct {
|
||||||
swarmOptions
|
swarmOptions
|
||||||
listenAddr NodeAddrOption
|
listenAddr NodeAddrOption
|
||||||
|
@ -46,7 +39,7 @@ func newInitCommand(dockerCli *command.DockerCli) *cobra.Command {
|
||||||
flags := cmd.Flags()
|
flags := cmd.Flags()
|
||||||
flags.Var(&opts.listenAddr, flagListenAddr, "Listen address (format: <ip|interface>[:port])")
|
flags.Var(&opts.listenAddr, flagListenAddr, "Listen address (format: <ip|interface>[:port])")
|
||||||
flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", "Advertised address (format: <ip|interface>[:port])")
|
flags.StringVar(&opts.advertiseAddr, flagAdvertiseAddr, "", "Advertised address (format: <ip|interface>[:port])")
|
||||||
flags.BoolVar(&opts.forceNewCluster, "force-new-cluster", false, "Force create a new cluster from current state.")
|
flags.BoolVar(&opts.forceNewCluster, "force-new-cluster", false, "Force create a new cluster from current state")
|
||||||
addSwarmFlags(flags, &opts.swarmOptions)
|
addSwarmFlags(flags, &opts.swarmOptions)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ type swarmOptions struct {
|
||||||
externalCA ExternalCAOption
|
externalCA ExternalCAOption
|
||||||
}
|
}
|
||||||
|
|
||||||
// NodeAddrOption is a pflag.Value for listen and remote addresses
|
// NodeAddrOption is a pflag.Value for listening addresses
|
||||||
type NodeAddrOption struct {
|
type NodeAddrOption struct {
|
||||||
addr string
|
addr string
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue