wpt.fyi icon indicating copy to clipboard operation
wpt.fyi copied to clipboard

Fix ireturn lint issues (golangci-lint)

Open LeonardYam opened this issue 1 year ago • 0 comments

ireturn detects functions that return interfaces.

Reasoning - Pre-emptive interfaces are generally an anti-pattern in Go due to implicit interfaces. Returning structs allows for quick navigation to the correct function.

Any lint issues related to ireturn can be found by searching for // nolint:ireturn.

Related issue: #2984

LeonardYam avatar May 16 '23 07:05 LeonardYam