mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-20 11:55:18 +00:00
lib/relay/protocol: Merge two Sprintf calls
This commit is contained in:
parent
eafb40460d
commit
13196ddd92
@ -60,13 +60,9 @@ func (i SessionInvitation) String() string {
|
|||||||
if address, err := syncthingprotocol.DeviceIDFromBytes(i.From); err == nil {
|
if address, err := syncthingprotocol.DeviceIDFromBytes(i.From); err == nil {
|
||||||
device = address.String()
|
device = address.String()
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%s@%s", device, i.AddressString())
|
return fmt.Sprintf("%s@%s:%d", device, net.IP(i.Address), i.Port)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i SessionInvitation) GoString() string {
|
func (i SessionInvitation) GoString() string {
|
||||||
return i.String()
|
return i.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i SessionInvitation) AddressString() string {
|
|
||||||
return fmt.Sprintf("%s:%d", net.IP(i.Address), i.Port)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user