mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +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 {
|
||||
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 {
|
||||
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