-
Notifications
You must be signed in to change notification settings - Fork 159
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
example with multiple return types #107
Comments
What is the code you're trying to return? |
func Foo(bz []byte) (SomeStruct, error) |
Use https://github.com/dave/jennifer#params for that: g.file.Func().Id("Unmarshal" + g.abiTypeStructName(obj.name)).
Params(jen.Id("bz").List().Byte()).
Params(jen.Id(obj.name), jen.Id("error")).
Block() |
lol just realised who I'm talking to 😂 hey Tyler! |
ah idk why i didnt think to just use params again lol. Thanks Dave! hahah hello! hope you've been enjoying your travels 🤝 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
was generating code that has multiple return types, but wasn't able to find a way to write that cleanly. currently what i'm doing is (and im not proud of this):
any help appreciated 🤟🏻
The text was updated successfully, but these errors were encountered: