Hi guys, Is there a way to get `go install` to error out if there is unused functions in the code base? This should of course only apply if package == main and the functions doesn't come from a library. This could reduce the amount of code that i have to maintain as a code block owner.
The reason i ask is that earlier today i found a couple of functions in my main package that wasn't used. That made me ask myself, why wasn't i notified about this by the compiler? The compiler seem able to figure out when a variable isn't being used but defined anyway. Why is this not being done for functions, do i have to provide some flag for this to happen perhaps? I haven't tried what happens with structs and the like yet... Does the Go compiler eliminate all dead code during compilation or does that require that i supply some flag to `go install`? I'm building on Go version 1.8. Regards, Patrik -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.