hanayo/vendor/github.com/thehowl/conf/example_test.go
2019-02-23 13:29:15 +00:00

22 lines
252 B
Go

package conf_test
import (
"fmt"
"github.com/thehowl/conf"
)
type myConf struct {
Name string
Age int
}
const myConfString = `Name=Jack
Age=19`
func Example() {
c := myConf{}
conf.LoadRaw(&c, []byte(myConfString))
fmt.Printf("%#v\n", c)
}