-
Hi I have a YAML file
And try to load it to golang code
then I get this error but if I use is this a bug or expected by ctx.CompileBytes() ? the context is I need to validate YAML files by cue definition inside golang code |
Beta Was this translation helpful? Give feedback.
Answered by
myitcv
Jul 26, 2021
Replies: 1 comment 3 replies
-
@roylisto the |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
roylisto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@roylisto the
cue.Context
methods are for loading CUE. You are looking for https://pkg.go.dev/cuelang.org/[email protected]/encoding/yaml#Extract, the result of which can then be built usingcue.Context.BuildFile()
.