We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 025f9f1 commit fc26014Copy full SHA for fc26014
1 file changed
event.go
@@ -129,6 +129,13 @@ func (e *Event) Msgf(format string, v ...interface{}) {
129
e.msg(fmt.Sprintf(format, v...))
130
}
131
132
+func (e *Event) MsgFunc(createMsg func() string) {
133
+ if e == nil {
134
+ return
135
+ }
136
+ e.msg(createMsg())
137
+}
138
+
139
func (e *Event) msg(msg string) {
140
for _, hook := range e.ch {
141
hook.Run(e, e.level, msg)
0 commit comments