make Peer.String() return the common case
When we want a string representation of a Peer, we nearly always just want the full name. So make String() return that and introduce Info() to return expanded info.
This commit is contained in:
1 parent
db198652a5
commit
0cbbe9bac3
8 files changed
+20
-20
No files matched your search
+1
-1
@@ -89,7 +89,7 @@ func (cache *MacCache) String() string {
|
||||
cache.RLock()
|
||||
defer cache.RUnlock()
|
||||
for key, entry := range cache.table {
|
||||
fmt.Fprintf(&buf, "%v -> %s (%v)\n", intmac(key), entry.peer.FullName(), entry.lastSeen)
|
||||
fmt.Fprintf(&buf, "%v -> %s (%v)\n", intmac(key), entry.peer, entry.lastSeen)
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user