Replies: 2 comments 1 reply
-
Original reply by @myitcv in cuelang/cue#1038 (comment) Please see https://cuelang.org/docs/integrations/go/#generate-go-code (note that as a caveat for now you will end up using deprecated identifiers: this will be fixed by cuelang/cue#1035) |
Beta Was this translation helpful? Give feedback.
-
Original reply by @verdverm in cuelang/cue#1038 (comment) In general, CUE doesn't have the ability to generate the structs in a target language. There are several past issues and discussions you might search for here. We've been using Some interesting difficulties are:
There may also be ideas around proposed solutions to the problem. I've personally written some generators for Go structs with https://github.com/hofstadter-io/hof |
Beta Was this translation helpful? Give feedback.
-
Originally opened by @owulveryck in cuelang/cue#1038
Hi,
I have a definition file that looks like this:
I'd like to generate the corresponding Go structures; I expect something like:
I tried to run
Is it the idiomatic way to create a go schema?
Why does it fail?
Beta Was this translation helpful? Give feedback.
All reactions