diff options
author | Janos Guljas <janos@resenje.org> | 2017-12-05 05:20:29 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2017-12-05 05:20:29 +0800 |
commit | b33a051a487bed2a010b62a6f2dc531157341013 (patch) | |
tree | 47bd4c8f7a0302aaedafb701b79c0f19398de14b /cmd/swarm | |
parent | 7898e0d585ac16ca80ddef3ef6933cc6d12ba576 (diff) | |
download | go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.gz go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.tar.zst go-tangerine-b33a051a487bed2a010b62a6f2dc531157341013.zip |
swarm: add comment for parseFlagEnsAPI and fix a mistake in comment in code
Diffstat (limited to 'cmd/swarm')
-rw-r--r-- | cmd/swarm/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 70cc42425..d9744c011 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -464,7 +464,6 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) { case 1: // Check if only one --ens-api is specified in order to use --ens-addr value // to preserve the backward compatibility with single --ens-api flag. - // Multiple c := parseFlagEnsAPI(ensAPIs[0]) if ensAddr != "" { // If contract address is specified in both cases, check for conflict. @@ -498,6 +497,9 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) { } } +// parseFlagEnsAPI parses EnsAPIFlag according to format +// [tld:][contract-addr@]url and returns ENSClientConfig structure +// with endpoint, contract address and TLD. func parseFlagEnsAPI(s string) swarm.ENSClientConfig { isAllLetterString := func(s string) bool { for _, r := range s { |