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

Go wraps cannot throw errors #1927

Open
krisbitney opened this issue Oct 30, 2023 · 0 comments
Open

Go wraps cannot throw errors #1927

krisbitney opened this issue Oct 30, 2023 · 0 comments
Labels
type: bug Something isn't working

Comments

@krisbitney
Copy link
Contributor

krisbitney commented Oct 30, 2023

Describe the bug
This is the generated interface for a module with a single method that returns a string:

type Module interface {
    Obscure(args *ArgsObscure) string
}

Since errors cannot be thrown in Go, we should handle them in the bindings as with do with Rust's Result type:

type Module interface {
    Obscure(args *ArgsObscure) (string, error)
}
@krisbitney krisbitney added the type: bug Something isn't working label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant