cmd, node: dump empty value config (#21296)
This commit is contained in:
@ -905,12 +905,15 @@ func setNAT(ctx *cli.Context, cfg *p2p.Config) {
|
||||
|
||||
// splitAndTrim splits input separated by a comma
|
||||
// and trims excessive white space from the substrings.
|
||||
func splitAndTrim(input string) []string {
|
||||
result := strings.Split(input, ",")
|
||||
for i, r := range result {
|
||||
result[i] = strings.TrimSpace(r)
|
||||
func splitAndTrim(input string) (ret []string) {
|
||||
l := strings.Split(input, ",")
|
||||
for _, r := range l {
|
||||
r = strings.TrimSpace(r)
|
||||
if len(r) > 0 {
|
||||
ret = append(ret, r)
|
||||
}
|
||||
}
|
||||
return result
|
||||
return ret
|
||||
}
|
||||
|
||||
// setHTTP creates the HTTP RPC listener interface string from the set
|
||||
|
Reference in New Issue
Block a user