MCPcopy Create free account
hub / github.com/postgres-ai/database-lab-engine / LoadYaml

Function LoadYaml

engine/pkg/util/projection/helpers.go:9–16  ·  view source on GitHub ↗

LoadYaml loads struct fields from yaml document.

(target interface{}, yaml *yaml.Node, options LoadOptions)

Source from the content-addressed store, hash-verified

7
8// LoadYaml loads struct fields from yaml document.
9func LoadYaml(target interface{}, yaml *yaml.Node, options LoadOptions) error {
10 soft, err := NewSoftYaml(yaml)
11 if err != nil {
12 return err
13 }
14
15 return Load(target, soft, options)
16}
17
18// StoreYaml stores struct fields to yaml document.
19func StoreYaml(target interface{}, yaml *yaml.Node, options StoreOptions) error {

Callers 4

TestLoadJsonMultiFunction · 0.85
TestLoadYamlFunction · 0.85
TestLoadYamlNullFunction · 0.85
TestLoadYaml_MergeKeyFunction · 0.85

Calls 2

NewSoftYamlFunction · 0.85
LoadFunction · 0.70

Tested by 4

TestLoadJsonMultiFunction · 0.68
TestLoadYamlFunction · 0.68
TestLoadYamlNullFunction · 0.68
TestLoadYaml_MergeKeyFunction · 0.68