Skip to content

Commit

Permalink
Add parameter names to the KeyValue interface (#88)
Browse files Browse the repository at this point in the history
Parameter serve as documentation, especially for AddString which accepts
two strings `(string, string)` vs `(key, value string)`
  • Loading branch information
prashantv authored and akshayjshah committed Jun 27, 2016
1 parent 37b4c8e commit 8898396
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions keyvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ package zap
//
// See Marshaler for an example.
type KeyValue interface {
AddBool(string, bool)
AddFloat64(string, float64)
AddInt(string, int)
AddInt64(string, int64)
AddMarshaler(string, LogMarshaler) error
AddBool(key string, value bool)
AddFloat64(key string, value float64)
AddInt(key string, value int)
AddInt64(key string, value int64)
AddMarshaler(key string, marshaler LogMarshaler) error
// AddObject uses reflection to serialize arbitrary objects, so it's slow and
// allocation-heavy. Consider implementing the LogMarshaler interface instead.
AddObject(string, interface{})
AddString(string, string)
Nest(string, func(KeyValue) error) error
AddObject(key string, value interface{})
AddString(key, value string)
Nest(key string, f func(KeyValue) error) error
}

0 comments on commit 8898396

Please sign in to comment.