refactor: replace buf.WriteString(fmt.S*(...)) with fmt.F*(&buf,...)

shorter and more efficient
This commit is contained in:
Matthias Radestock committed 2015-03-26 14:20:28 +00:00
1 parent e7335f361c
commit 45740b1419
7 files changed
+20 -20

No files matched your search

+1 -1
View File
@@ -90,7 +90,7 @@ func (cache *MacCache) String() string {
cache.RLock()
defer cache.RUnlock()
for key, entry := range cache.table {
buf.WriteString(fmt.Sprintf("%v -> %s (%v)\n", intmac(key), entry.peer.Name, entry.lastSeen))
fmt.Fprintf(&buf, "%v -> %s (%v)\n", intmac(key), entry.peer.Name, entry.lastSeen)
}
return buf.String()
}