This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
Expected behavior when unifying values and writing out their syntax #873
Unanswered
brandoshmando
asked this question in
Q&A
Replies: 2 comments 2 replies
-
It's a little tricky to see exactly what you're looking to do here, so I've tried to express it in terms of pure CUE:
And to further confirm, you're looking to use the API to get the value of
Please can you also confirm what version of CUE you are using? |
Beta Was this translation helpful? Give feedback.
2 replies
-
This discussion has been migrated to cue-lang/cue#873. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there! I'm attempting to generate cue primitive values from go code and write out their syntax to a file, but I'm running into some (seemingly) unexpected behavior when actually writing out the values to syntax. In the following simplified example, I'm attempting to generate a pattern for a string field that has a default within a struct.
What's interesting is that the unified value that's generated outputs the syntax that I would expect, i.e.
But once I fill that value into a new struct as
field1
, the syntax seems to evaluate the raw cue and complete the value with its default, i.e.Instead I'd expect (and was hoping) that the syntax would look like this:
Is this expected behavior and if so, is there a way to prevent the raw cue of the
unified
value from evaluating to its default?Beta Was this translation helpful? Give feedback.
All reactions