yaml2go
yaml2go copied to clipboard
go2yaml
Is there any way to do a go struct -> yaml conversion ? Need to generate some docs for the structs 🤔
@edbighead could you please share an example? Trying to understand the use case
@edbighead could you please share an example? Trying to understand the use case
Having a bunch of nested go structs, let's say for a kube deployment https://github.com/kubernetes/api/blob/b8c40e080bc5e830097df540d4ef804034cb5bdb/apps/v1/types.go#L318-L332
I would need to write some markdown docs with all possible available yaml fields, like https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#describing-a-kubernetes-object
@edbighead the only challenge I see is the values field values. We can extract the field names but the values will still have to do populate manually.
@edbighead the only challenge I see is the values field values. We can extract the field names but the values will still have to do populate manually.
it will be handy to have just value types:
spec:
name: "string"
isEnabled: true
count: 60
children:
- "string"
- "string"