4 ms·
That's an insane approach, eslint solves this just fine and is fully configurable for almost any style preference.
by pharke 6y ago
That's an insane approach, eslint solves this just fine and is fully configurable for almost any style preference.
- strken 6y agoAll Go code everywhere never has unused variables, never has unused imports, and is formatted similarly. But, when you're debugging a function, you can't leave unused variables or imports lying around. It's a tradeoff. I don't think either side of the tradeoff is insane.
- cbm-vic-20 6y agoSounds like a good argument for a --relax-im-just-trying-something flag for the go compiler, and taint the resulting code with it so if anyone else tries to use the code without the same flag, then the compiler/linker will complain.
- SureshG 6y agoYou can do underscore import and local variable to workaround this limitation and I have seen that in the code.