type bar struct {
HogeFuga int
}
type example struct {
Foo string
Bar bar
}
func main() {
b, _ := toml.Marshal(&example{Foo: "foo", Bar: bar{HogeFuga: 100}})
yamlText, _ := ToYAML(b)
fmt.Println(string(yamlText))
// Bar:
// HogeFuga: 100
// Foo: foo
}
ToYAML receives TOML encoded bytes `t` and
converts `t` to YAML encoded bytes.
`t` must be []byte, string or io.Reader.
If some fields have "toml" tag, its "json" tag's value must be same value "toml" one.