Skip to content

Commit 164f7aa

Browse files
authored
Add Any field function (#515)
1 parent 3543e9d commit 164f7aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

event.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,11 @@ func (e *Event) TimeDiff(key string, t time.Time, start time.Time) *Event {
707707
return e
708708
}
709709

710+
// Any is a wrapper around Event.Interface.
711+
func (e *Event) Any(key string, i interface{}) *Event {
712+
return e.Interface(key, i)
713+
}
714+
710715
// Interface adds the field key with i marshaled using reflection.
711716
func (e *Event) Interface(key string, i interface{}) *Event {
712717
if e == nil {

0 commit comments

Comments
 (0)