Skip to content
Myr

Whoops, accidentally commited this new Sub type idea

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 4b4655b · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:tea.go+1 added-2 removed
1package tea23import (4 "context"4 "errors"5 "io"6 "os"7 "strings"
9 unmodified lines
17type Cmd func(Model) Msg1819// Sub is an event subscription. If it returns nil it's considered a no-op,20// but there's really no reason to have a nil subscription.22type Sub func(context.Context, Model) Msg21type Sub func(Model) Msg2223// Subs is a keyed set of subscriptions. The key should be a unique24// identifier; two different subscriptions should not have the same key25type Subs map[string]Sub
244 unmodified lines