|
%!s(int64=2) %!d(string=hai) anos | |
---|---|---|
.. | ||
encoder | %!s(int64=2) %!d(string=hai) anos | |
loader | %!s(int64=2) %!d(string=hai) anos | |
reader | %!s(int64=2) %!d(string=hai) anos | |
secrets | %!s(int64=2) %!d(string=hai) anos | |
source | %!s(int64=2) %!d(string=hai) anos | |
README.md | %!s(int64=2) %!d(string=hai) anos | |
config.go | %!s(int64=2) %!d(string=hai) anos | |
default.go | %!s(int64=2) %!d(string=hai) anos | |
default_test.go | %!s(int64=2) %!d(string=hai) anos | |
options.go | %!s(int64=2) %!d(string=hai) anos | |
value.go | %!s(int64=2) %!d(string=hai) anos |
###
测试用例:
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())
}