@cryptotaxi247 / kubo / commits / 80bc9251a

style(peer) shorter ID when printing Peer

feel free to contest/revert if this becomes a problem License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Dec 8, 2014 at 04:08 UTC 80bc9251a6a78b73241409f75b3739934f3d48ec
1 file changed +2 -2
peer/peer.go
+2 -2
@@ -161,11 +161,11 @@ type peer struct {
161 // codebase is known to be correct.
162 func (p *peer) String() string {
163 pid := p.id.String()
164 - maxRunes := 12
164 + maxRunes := 6
165 if len(pid) < maxRunes {
166 maxRunes = len(pid)
167 }
168 - return "[Peer " + pid[:maxRunes] + "]"
168 + return fmt.Sprintf("peer %s", pid[:maxRunes])
169 }
170
171 func (p *peer) Loggable() map[string]interface{} {