mirror of
https://github.com/status-im/consul.git
synced 2025-02-04 09:55:49 +00:00
Use empty string for addr in ServerDetails.String()
This commit is contained in:
parent
970938c2dd
commit
dc291e4027
@ -48,7 +48,12 @@ func (s *ServerDetails) Key() *Key {
|
|||||||
|
|
||||||
// String returns a string representation of ServerDetails
|
// String returns a string representation of ServerDetails
|
||||||
func (s *ServerDetails) String() string {
|
func (s *ServerDetails) String() string {
|
||||||
return fmt.Sprintf("%s (Addr: %s) (DC: %s)", s.Name, s.Addr, s.Datacenter)
|
var serverAddr string
|
||||||
|
if s.Addr != nil {
|
||||||
|
serverAddr = s.Addr.String() + s.Addr.Network()
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%s (Addr: %s) (DC: %s)", s.Name, serverAddr, s.Datacenter)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsConsulServer returns true if a serf member is a consul server. Returns a
|
// IsConsulServer returns true if a serf member is a consul server. Returns a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user