4 ms·
This is underappreciated! I suppose you are less likely to care about errors if you aren't getting values from a function, but not always. I wonder if there is
by matthewbauer 7y ago
This is underappreciated! I suppose you are less likely to care about errors if you aren't getting values from a function, but not always. I wonder if there is a proposal to force this case to be handled, like Haskell's -Wunused-do-bind?
- matthewbauer 7y agoFound it: https://github.com/golang/go/issues/20803 https://github.com/golang/go/issues/20803
- pcwalton 7y agoThere's go vet. But it's inconsistent with the Go warnings-are-errors philosophy. Ignoring the return value of os.Mkdir() is far more likely to be a bug than an unused import is.