Comment on Golang be like
ennemi@hexbear.net 1 year agoIf only there was some way the compiler could detect unused variable declarations, and may be emit some sort of “warning”, which would be sort of like an “error”, but wouldn’t interrupt the build, and could be treated as an error in CI pipelines
iammike@programming.dev 1 year ago
Some people simply ignore warnings, that’s the main issue. Trust me, I saw this way too often.
If you cannot compile it than you have to fix it, otherwise just mark unused variables as ‘not an error’ via
_ = someunusedvar
.