refactor: replace buf.WriteString(fmt.S*(...)) with fmt.F*(&buf,...)
shorter and more efficient
This commit is contained in:
1 parent
e7335f361c
commit
45740b1419
7 files changed
+20
-20
No files matched your search
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user