|
|
hace 2 años | |
|---|---|---|
| .. | ||
| encoder | hace 2 años | |
| loader | hace 2 años | |
| reader | hace 2 años | |
| secrets | hace 2 años | |
| source | hace 2 años | |
| README.md | hace 2 años | |
| config.go | hace 2 años | |
| default.go | hace 2 años | |
| default_test.go | hace 2 años | |
| options.go | hace 2 años | |
| value.go | hace 2 años | |
###
测试用例:
import (
"fmt"
"testing"
"gogs.baozhida.cn/zoie/OAuth-core/config"
"gogs.baozhida.cn/zoie/OAuth-core/config/source/file"
)
func TestApp(t *testing.T) {
c, err := config.NewConfig()
if err != nil {
t.Error(err)
}
err = c.Load(file.NewSource(file.WithPath("config/settings.yml")))
if err != nil {
t.Error(err)
}
fmt.Println(c.Map())
}