aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2019-07-08 20:59:07 +0800
committerGuillaume Ballet <gballet@gmail.com>2019-07-08 20:59:07 +0800
commit22060611fb4ea9d82af66a86f2effdf969425b03 (patch)
treecc9ca3d66bd500e232c1ee9d7beed0778f1e611d /cmd/utils/flags.go
parentcdfe9a3a2a257dcd2506e9a0eaf3bf3b0986c43a (diff)
downloadgo-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.tar
go-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.tar.gz
go-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.tar.bz2
go-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.tar.lz
go-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.tar.xz
go-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.tar.zst
go-tangerine-22060611fb4ea9d82af66a86f2effdf969425b03.zip
cmd/abigen: refactor command line interface (#19797)
* cmd, common: refactor abigen command line interface * cmd/abigen: address comment
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index f928edc0f..9a92e21fe 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -944,7 +944,7 @@ func setWS(ctx *cli.Context, cfg *node.Config) {
// setIPC creates an IPC path configuration from the set command line flags,
// returning an empty string if IPC was explicitly disabled, or the set path.
func setIPC(ctx *cli.Context, cfg *node.Config) {
- checkExclusive(ctx, IPCDisabledFlag, IPCPathFlag)
+ CheckExclusive(ctx, IPCDisabledFlag, IPCPathFlag)
switch {
case ctx.GlobalBool(IPCDisabledFlag.Name):
cfg.IPCPath = ""
@@ -1329,10 +1329,10 @@ func setWhitelist(ctx *cli.Context, cfg *eth.Config) {
}
}
-// checkExclusive verifies that only a single instance of the provided flags was
+// CheckExclusive verifies that only a single instance of the provided flags was
// set by the user. Each flag might optionally be followed by a string type to
// specialize it further.
-func checkExclusive(ctx *cli.Context, args ...interface{}) {
+func CheckExclusive(ctx *cli.Context, args ...interface{}) {
set := make([]string, 0, 1)
for i := 0; i < len(args); i++ {
// Make sure the next argument is a flag and skip if not set
@@ -1386,10 +1386,10 @@ func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) {
// SetEthConfig applies eth-related command line flags to the config.
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
// Avoid conflicting network flags
- checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag, GoerliFlag)
- checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
+ CheckExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag, GoerliFlag)
+ CheckExclusive(ctx, LightServFlag, SyncModeFlag, "light")
// Can't use both ephemeral unlocked and external signer
- checkExclusive(ctx, DeveloperFlag, ExternalSignerFlag)
+ CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag)
var ks *keystore.KeyStore
if keystores := stack.AccountManager().Backends(keystore.KeyStoreType); len(keystores) > 0 {
ks = keystores[0].(*keystore.KeyStore)