mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
prevent white spaces as being accepted as valid host
This commit is contained in:
parent
50277df74c
commit
4247e1ce74
6
etcd.go
6
etcd.go
@ -542,13 +542,15 @@ func getInfo(path string) *Info {
|
||||
} else {
|
||||
// Otherwise ask user for info and write it to file.
|
||||
|
||||
hostname = strings.TrimSpace(hostname)
|
||||
|
||||
if hostname == "" {
|
||||
fatal("Please give the address of the local machine")
|
||||
}
|
||||
|
||||
fmt.Println("address ", hostname)
|
||||
|
||||
info.Hostname = hostname
|
||||
info.Hostname = strings.TrimSpace(info.Hostname)
|
||||
fmt.Println("address ", info.Hostname)
|
||||
|
||||
info.RaftPort = raftPort
|
||||
info.ClientPort = clientPort
|
||||
|
Loading…
x
Reference in New Issue
Block a user