Today I learned how to find unreachable code in a Go project using the deadcode tool.
Install deadcode:
go install golang.org/x/tools/cmd/deadcode@latestRun deadcode on your Codebase:
go tool deadcode ./...Example output:
example/foo.go:42:6: func unusedFuncReferences
deadcode documentation [Official Go tools]
