[fix] spelling

This commit is contained in:
Max 2022-08-20 21:29:00 +08:00
parent 7517e4652a
commit c0402149ce

View file

@ -24,7 +24,7 @@ import (
var watchShutdown = make(chan bool, 1) // shutdown signal var watchShutdown = make(chan bool, 1) // shutdown signal
var watchReady = make(chan bool, 1) // ready signal var watchReady = make(chan bool, 1) // ready signal
var excludes = map[string]bool{"ui": true, "db": true, "data": true} var excludes = map[string]bool{"ui": true, "db": true, "data": true}
var hanlders = map[string]func(root string, file string, event string, cfg config.Config){ var handlers = map[string]func(root string, file string, event string, cfg config.Config){
"models": watchModel, "models": watchModel,
} }
@ -76,7 +76,7 @@ func watchStart(cfg config.Config) error {
} }
name := dir.Name() name := dir.Name()
if _, has := hanlders[name]; !has { if _, has := handlers[name]; !has {
continue continue
} }
@ -108,7 +108,7 @@ func watchStart(cfg config.Config) error {
} }
} }
// event hanlder // event handler
go func() { go func() {
for { for {
select { select {
@ -129,8 +129,8 @@ func watchStart(cfg config.Config) error {
widget := pi[0] widget := pi[0]
watchHanler := watchReload watchHanler := watchReload
if hanlder, has := hanlders[widget]; has { if handler, has := handlers[widget]; has {
watchHanler = hanlder watchHanler = handler
} }
if _, has := excludes[widget]; !has { if _, has := excludes[widget]; !has {