Skip to content

Commit

Permalink
Add Any field function (rs#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
dils2k authored and pablitoc committed Apr 7, 2023
1 parent 7c0b325 commit 9a67273
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 @@ -750,6 +750,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 9a67273

Please sign in to comment.