4 ms·
You have never commented out a section of code that was the only place an import was used for debugging?
by fhood 10y ago
You have never commented out a section of code that was the only place an import was used for debugging?
- jameskilton 10y agoOf course I have. That's not a good reason for the compiler to allow the unused imports. The benefits of Go's strict compilation rules far outweigh the periodic pain points.
- imauld 10y agoSure. I also use Atom with gofmt installed (the Atom gofmt package allows you to use goimports as a formatter). Comment the line and hit save and the import goes away. Uncomment and hit save and it comes back. Tools exist to make dealing with this requirement painless.