wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

Go wraps cannot throw errors

Open krisbitney opened this issue 2 years ago • 0 comments

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 avatar Oct 30 '23 08:10 krisbitney