Skip to content

Commit

Permalink
Add Any field function (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
dils2k committed Jan 19, 2023
1 parent 3543e9d commit 164f7aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,11 @@ func (e *Event) TimeDiff(key string, t time.Time, start time.Time) *Event {
return e
}

// Any is a wrapper around Event.Interface.
func (e *Event) Any(key string, i interface{}) *Event {
return e.Interface(key, i)
}

// Interface adds the field key with i marshaled using reflection.
func (e *Event) Interface(key string, i interface{}) *Event {
if e == nil {
Expand Down

0 comments on commit 164f7aa

Please sign in to comment.