diff options
Diffstat (limited to 'event/dispatch.go')
| -rw-r--r-- | event/dispatch.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/event/dispatch.go b/event/dispatch.go index 6fe0102..738161a 100644 --- a/event/dispatch.go +++ b/event/dispatch.go @@ -20,6 +20,12 @@ func Sprint(a ...interface{}) string { return buf.String() } +func Sscan(event string, a ...interface{}) { + for i, part := range strings.Split(event, Sep) { + fmt.Sscan(part, a[i]) + } +} + type Dispatch struct { mu sync.Mutex handlers []func(event string) bool |