Add default formatter events handler

This commit is contained in:
lash 2025-01-13 17:47:55 +00:00
parent fee439121d
commit 6b22fe134a
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -1,6 +1,8 @@
package event package event
import ( import (
"fmt"
"git.grassecon.net/grassrootseconomics/sarafu-api/remote" "git.grassecon.net/grassrootseconomics/sarafu-api/remote"
) )
@ -12,5 +14,8 @@ type EventsHandler struct {
func NewEventsHandler(api remote.AccountService) *EventsHandler { func NewEventsHandler(api remote.AccountService) *EventsHandler {
return &EventsHandler{ return &EventsHandler{
api: api, api: api,
formatFunc: func(tag string, i int, o any) string {
return fmt.Sprintf("%d %v", i, o)
},
} }
} }