github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/encoding/yaml.go (about)

     1  package encoding
     2  
     3  import (
     4  	"gopkg.in/yaml.v2"
     5  )
     6  
     7  // LoadAndUnmarshalYAML loads data from the specified path and decodes it into
     8  // the specified structure.
     9  func LoadAndUnmarshalYAML(path string, value any) error {
    10  	return LoadAndUnmarshal(path, func(data []byte) error {
    11  		return yaml.UnmarshalStrict(data, value)
    12  	})
    13  }