feat: add viper to implement read yaml,ini config

This commit is contained in:
weloe
2023-05-10 03:23:13 +08:00
parent c0542eb26e
commit eb4edb54a2
7 changed files with 549 additions and 7 deletions

View File

@@ -145,7 +145,7 @@ func TestNewEnforcerByFile(t *testing.T) {
}
adapter := persist.NewDefaultAdapter()
conf := "testConf"
conf := "./examples/token_conf.yaml"
enforcer, err := NewEnforcer(conf, adapter)
if err != nil {