wpt.fyi
wpt.fyi copied to clipboard
Fix ireturn lint issues (golangci-lint)
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