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

Support for union types #119

Open
ecker00 opened this issue Jan 5, 2023 · 2 comments
Open

Support for union types #119

ecker00 opened this issue Jan 5, 2023 · 2 comments

Comments

@ecker00
Copy link

ecker00 commented Jan 5, 2023

First thank you for making this, great tool to get GoLang clients up to speed fast.

I noticed that union types are ignored when generating:

union AorB = A | B

In the output AorB does not exist, and other types which use it comes up as undefined like this:

type Results struct {
	Hits  *[]undefined `json:"hits,omitempty"`
	Total Int          `json:"total"`
}
@zigomir
Copy link
Contributor

zigomir commented Apr 14, 2023

I'd also love this, if it's possible. I'm completely unfamiliar with Go-lang so I'm not sure if it even supports union types.
For my use case, omitting union types in generated .go file would solve my immediate problem so I created this branch.

@ctison if I open a PR for it, would you accept it?

@ctison
Copy link
Owner

ctison commented Apr 15, 2023

Yes, please do. @zigomir

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

3 participants