// // yaml.go // Copyright (C) 2023 tiglog // // Distributed under terms of the MIT license. // package gyaml import "gopkg.in/yaml.v3" // For example: // // type T struct { // F int `yaml:"a,omitempty"` // B int // } // var t T // gyaml.Decode([]byte("a: 1\nb: 2"), &t) func Decode(buf []byte, dest any) error { return yaml.Unmarshal(buf, dest) }