package
2.0.3+incompatible
Repository: https://github.com/maodapeng/server-core.git
Documentation: pkg.go.dev
# README
测试用例:
import (
"fmt"
"testing"
"github.com/maodapeng/server-core/config"
"github.com/maodapeng/server-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())
}