[fix] spelling
This commit is contained in:
parent
7517e4652a
commit
c0402149ce
1 changed files with 5 additions and 5 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue