Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go2yaml #34

Open
edbighead opened this issue Jun 9, 2021 · 4 comments
Open

go2yaml #34

edbighead opened this issue Jun 9, 2021 · 4 comments

Comments

@edbighead
Copy link

Is there any way to do a go struct -> yaml conversion ? Need to generate some docs for the structs 🤔

@PrasadG193
Copy link
Owner

@edbighead could you please share an example? Trying to understand the use case

@edbighead
Copy link
Author

edbighead commented Mar 7, 2022

@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

@PrasadG193
Copy link
Owner

@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
Copy link
Author

@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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants