/
flags.go
36 lines (28 loc) · 966 Bytes
/
flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package cli
import (
flag "github.com/spf13/pflag"
)
const (
FlagAddressValidator = "validator"
FlagMoniker = "moniker"
FlagIdentity = "identity"
FlagWebsite = "website"
FlagSecurityContact = "security-contact"
FlagDetails = "details"
)
// common flagsets to add to various functions
var (
fsValidator = flag.NewFlagSet("", flag.ContinueOnError)
)
func init() {
fsValidator.String(FlagAddressValidator, "", "The Bech32 address of the validator")
}
func FlagSetDescriptionCreate() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagMoniker, "", "The validator's name")
fs.String(FlagIdentity, "", "The optional identity signature (ex. UPort or Keybase)")
fs.String(FlagWebsite, "", "The validator's (optional) website")
fs.String(FlagSecurityContact, "", "The validator's (optional) security contact email")
fs.String(FlagDetails, "", "The validator's (optional) details")
return fs
}