V2bX/conf/conf_test.go
2023-06-02 10:18:10 +08:00

20 lines
346 B
Go

package conf
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 {}
}