Typo: renamed DefualtHandler to DefaultHandler
This commit is contained in:
parent
24acd523c7
commit
75e0f771c4
@ -221,6 +221,7 @@ func findMatch(mux map[string]func(Event), path string) string {
|
|||||||
return pattern
|
return pattern
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all existing defined Handlers from the map
|
// Remove all existing defined Handlers from the map
|
||||||
func (es *EvtStream) ResetHandlers() {
|
func (es *EvtStream) ResetHandlers() {
|
||||||
for Path, _ := range es.Handlers {
|
for Path, _ := range es.Handlers {
|
||||||
@ -309,7 +310,7 @@ func NewTimerCh(du time.Duration) chan Event {
|
|||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
||||||
var DefualtHandler = func(e Event) {
|
var DefaultHandler = func(e Event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var usrEvtCh = make(chan Event)
|
var usrEvtCh = make(chan Event)
|
||||||
|
@ -51,7 +51,7 @@ func Init() error {
|
|||||||
DefaultEvtStream.Merge("timer", NewTimerCh(time.Second))
|
DefaultEvtStream.Merge("timer", NewTimerCh(time.Second))
|
||||||
DefaultEvtStream.Merge("custom", usrEvtCh)
|
DefaultEvtStream.Merge("custom", usrEvtCh)
|
||||||
|
|
||||||
DefaultEvtStream.Handle("/", DefualtHandler)
|
DefaultEvtStream.Handle("/", DefaultHandler)
|
||||||
DefaultEvtStream.Handle("/sys/wnd/resize", func(e Event) {
|
DefaultEvtStream.Handle("/sys/wnd/resize", func(e Event) {
|
||||||
w := e.Data.(EvtWnd)
|
w := e.Data.(EvtWnd)
|
||||||
Body.Width = w.Width
|
Body.Width = w.Width
|
||||||
|
Loading…
Reference in New Issue
Block a user