wrapcheck icon indicating copy to clipboard operation
wrapcheck copied to clipboard

Unexported interface methods are internal

Open MichaelUrman opened this issue 2 months ago • 0 comments

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.

MichaelUrman avatar May 30 '24 19:05 MichaelUrman