|
|
il y a 2 ans | |
|---|---|---|
| .. | ||
| encoder | il y a 2 ans | |
| loader | il y a 2 ans | |
| reader | il y a 2 ans | |
| secrets | il y a 2 ans | |
| source | il y a 2 ans | |
| README.md | il y a 2 ans | |
| config.go | il y a 2 ans | |
| default.go | il y a 2 ans | |
| default_test.go | il y a 2 ans | |
| options.go | il y a 2 ans | |
| value.go | il y a 2 ans | |
###
测试用例:
import (
"fmt"
"testing"
"git.baozhida.cn/OAuth-core/config"
"git.baozhida.cn/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())
}