mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tools: Fix shadow variables and incorrect printing format.
This commit is contained in:
parent
d705df047b
commit
232439191c
@ -166,9 +166,9 @@ func main() {
|
||||
|
||||
ports := []uint16{}
|
||||
for _, p := range strings.Split(*portsArg, ",") {
|
||||
p, err := strconv.Atoi(p)
|
||||
port, err := strconv.Atoi(p)
|
||||
if err == nil {
|
||||
ports = append(ports, uint16(p))
|
||||
ports = append(ports, uint16(port))
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "Failed to parse port \"%s\": %v\n", p, err)
|
||||
os.Exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user