Skip to content

Commit

Permalink
Merge pull request sirupsen#335 from dim/master
Browse files Browse the repository at this point in the history
Avoid re-allocations
  • Loading branch information
sirupsen committed Mar 17, 2016
2 parents 70d89df + b81f34e commit 9ccfbde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (entry *Entry) WithField(key string, value interface{}) *Entry {

// Add a map of fields to the Entry.
func (entry *Entry) WithFields(fields Fields) *Entry {
data := Fields{}
data := make(Fields, len(entry.Data)+len(fields))
for k, v := range entry.Data {
data[k] = v
}
Expand Down

0 comments on commit 9ccfbde

Please sign in to comment.