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
@@ -68,7 +68,7 @@ func (zone *ZoneDb) String() string {
defer zone.mx.RUnlock()
var buf bytes.Buffer
for _, r := range zone.recs {
buf.WriteString(fmt.Sprintf("%.12s %s %v\n", r.Ident, r.IP, r.Name))
fmt.Fprintf(&buf, "%.12s %s %v\n", r.Ident, r.IP, r.Name)
}
return buf.String()
}