|
|
vor 2 Jahren | |
|---|---|---|
| .. | ||
| encoder | vor 2 Jahren | |
| loader | vor 2 Jahren | |
| reader | vor 2 Jahren | |
| secrets | vor 2 Jahren | |
| source | vor 2 Jahren | |
| README.md | vor 2 Jahren | |
| config.go | vor 2 Jahren | |
| default.go | vor 2 Jahren | |
| default_test.go | vor 2 Jahren | |
| options.go | vor 2 Jahren | |
| value.go | vor 2 Jahren | |
###
测试用例:
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())
}