gogolandgolint

Is it possible to find every place where function returns interface and not concrete type in Go project?


Following this article: “Accept interfaces, return structs” in Go and now want to find within existing project all functions that return interface and not concrete type, is it possible?


Solution

  • You could use ireturn which is also included in golangci-lint.