19 lines
242 B
Go
19 lines
242 B
Go
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"`
|
|
}
|