From 164f7aa1a64acb4ec010b7c0d94f6066780a3a91 Mon Sep 17 00:00:00 2001 From: dils2k Date: Thu, 19 Jan 2023 16:10:08 +0500 Subject: [PATCH] Add Any field function (#515) --- event.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/event.go b/event.go index eb5c90dd..2e736c83 100644 --- a/event.go +++ b/event.go @@ -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 {