mirror of
https://github.com/syncthing/syncthing.git
synced 2026-04-05 07:03:48 -04:00
lib/relay/protocol: Merge two Sprintf calls
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user