mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-21 15:49:37 +08:00
Prettier abbreviation
This commit is contained in:
2
peer.go
2
peer.go
@@ -147,7 +147,7 @@ func (peer *Peer) String() string {
|
||||
base64Key := base64.StdEncoding.EncodeToString(peer.handshake.remoteStatic[:])
|
||||
abbreviatedKey := "invalid"
|
||||
if len(base64Key) == 44 {
|
||||
abbreviatedKey = base64Key[0:4] + "..." + base64Key[40:44]
|
||||
abbreviatedKey = base64Key[0:4] + "…" + base64Key[39:43]
|
||||
}
|
||||
return fmt.Sprintf("peer(%s)", abbreviatedKey)
|
||||
}
|
||||
|
Reference in New Issue
Block a user