2023-04-07 01:11:56 -04:00
|
|
|
package conf
|
2023-05-21 23:20:09 -04:00
|
|
|
|
2023-06-01 22:18:10 -04:00
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
"testing"
|
|
|
|
)
|
2023-05-21 23:20:09 -04:00
|
|
|
|
|
|
|
func TestConf_LoadFromPath(t *testing.T) {
|
|
|
|
c := New()
|
2023-06-09 09:20:41 -04:00
|
|
|
t.Log(c.LoadFromPath("../example/config.yml.example"))
|
2023-05-21 23:20:09 -04:00
|
|
|
}
|
2023-06-01 22:18:10 -04:00
|
|
|
|
|
|
|
func TestConf_Watch(t *testing.T) {
|
|
|
|
c := New()
|
2023-06-09 09:20:41 -04:00
|
|
|
log.Println(c.Watch("../example/config.yml.example", func() {
|
2023-06-01 22:18:10 -04:00
|
|
|
log.Println(1)
|
2023-06-09 09:20:41 -04:00
|
|
|
}))
|
2023-06-01 22:18:10 -04:00
|
|
|
select {}
|
|
|
|
}
|