wrapcheck
wrapcheck copied to clipboard
Unexported interface methods are internal
When an interface method is not exported, its implementation can be assumed to wrap errors. This can be implemented by requiring sel.Sel.IsExported()
before checking for isInterface(pass, sel)
.
Then e.g., the test interface_on_struct
can be extended to define a decode(v interface{}) error
and call it without issuing an error.