add wait many change for watcher

This commit is contained in:
yuzuki999
2023-06-02 10:18:10 +08:00
parent df422c965b
commit 0271d0a884
2 changed files with 23 additions and 2 deletions

View File

@@ -1,8 +1,19 @@
package conf
import "testing"
import (
"log"
"testing"
)
func TestConf_LoadFromPath(t *testing.T) {
c := New()
t.Log(c.LoadFromPath("../example/config.yml.example"), c.NodesConfig[0].ControllerConfig.LimitConfig.IPLimit)
}
func TestConf_Watch(t *testing.T) {
c := New()
c.Watch("../example/config.yml.example", func() {
log.Println(1)
})
select {}
}