-
Notifications
You must be signed in to change notification settings - Fork 3
/
flags.go
56 lines (41 loc) · 1.56 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
49
50
51
52
53
54
55
56
package cli
// DONTCOVER
import (
flag "github.com/spf13/pflag"
)
const (
FlagPlanType = "plan-type"
FlagFarmingPoolAddr = "farming-pool-addr"
FlagTerminationAddr = "termination-addr"
FlagStakingCoinDenom = "staking-coin-denom"
FlagTerminated = "terminated"
FlagAll = "all"
)
// flagSetPlans returns the FlagSet used for farming plan related opertations.
func flagSetPlans() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagPlanType, "", "The plan type; private or public")
fs.String(FlagFarmingPoolAddr, "", "The bech32 address of the farming pool account")
fs.String(FlagTerminationAddr, "", "The bech32 address of the termination account")
fs.String(FlagStakingCoinDenom, "", "The staking coin denom")
fs.String(FlagTerminated, "", "Whether the plan is terminated or not (true/false)")
return fs
}
// flagSetStakings returns the FlagSet used for farmer's staking coin denom.
func flagSetStakings() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagStakingCoinDenom, "", "The staking coin denom")
return fs
}
// flagSetRewards returns the FlagSet used for farmer's rewards.
func flagSetRewards() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.String(FlagStakingCoinDenom, "", "The staking coin denom")
return fs
}
// flagSetHarvest returns the FlagSet used for harvest all staking coin denoms.
func flagSetHarvest() *flag.FlagSet {
fs := flag.NewFlagSet("", flag.ContinueOnError)
fs.Bool(FlagAll, false, "Harvest for all staking coin denoms")
return fs
}