refactor conf

This commit is contained in:
Yuzuki616
2023-08-20 15:13:52 +08:00
parent 42407d5c62
commit 214324496d
19 changed files with 346 additions and 287 deletions

View File

@@ -1,17 +1,16 @@
package conf
import (
"log"
"strings"
"testing"
)
func TestConf_LoadFromPath(t *testing.T) {
c := New()
t.Log(c.LoadFromPath("../example/config.yml.example"))
t.Log(c.LoadFromPath("./config.json"), c.NodeConfig)
}
func TestConf_Watch(t *testing.T) {
//c := New()
log.Println(strings.Split("aaaa", " "))
c := New()
t.Log(c.Watch("./1.json", "", func() {}))
select {}
}