/
flags.go
48 lines (41 loc) · 1.51 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
package cli
import (
flag "github.com/spf13/pflag"
)
const (
FlagPubKey = "pubkey"
FlagAmount = "amount"
FlagVestingAmount = "vesting-amount"
FlagMoniker = "moniker"
FlagIdentity = "identity"
FlagWebsite = "website"
FlagSecurityContact = "security-contact"
FlagDetails = "details"
FlagNodeID = "node-id"
FlagIP = "ip"
flagAddress = "address"
flagEngagement = "engagement"
flagDistribution = "distribution"
)
// FlagSetAmounts Returns the FlagSet for amount related operations.
func FlagSetAmounts() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagAmount, "", "Amount of liquid coins to bond")
fs.String(FlagVestingAmount, "", "Amount of vesting coins to bond")
return fs
}
// FlagSetPublicKey Returns the flagset for Public Key related operations.
func FlagSetPublicKey() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagPubKey, "", "The validator's Protobuf JSON encoded public key")
return fs
}
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
}