提交
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package yamlx_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"code.yun.ink/pkg/yamlx"
|
||||
)
|
||||
|
||||
func TestConfig(t *testing.T) {
|
||||
c := Config{}
|
||||
yamlx.InitConfig("./demo.yaml", &c)
|
||||
fmt.Println(c)
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Name string `json:"name" yaml:"name"`
|
||||
}
|
||||
Reference in New Issue
Block a user