MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / YAMLtoJSON

Function YAMLtoJSON

internal/config/convert/convert.go:71–84  ·  view source on GitHub ↗
(n yaml.Node)

Source from the content-addressed store, hash-verified

69}
70
71func YAMLtoJSON(n yaml.Node) ([]byte, error) {
72 if n.Kind == 0 {
73 return []byte{}, nil
74 }
75 iface, err := gen(&n)
76 if err != nil {
77 return nil, err
78 }
79 blob, err := json.Marshal(iface)
80 if err != nil {
81 return nil, err
82 }
83 return blob, nil
84}

Callers 2

pluginCodegenFunction · 0.92
codegenFunction · 0.92

Calls 1

genFunction · 0.85

Tested by

no test coverage detected