3 ms·
A workaround: assign the unused variable to underscore. _ = myUnusedVar Now you have used it.
by sethammons 6y ago
A workaround: assign the unused variable to underscore.
_ = myUnusedVar
Now you have used it.
- Ashanmaril 6y agoThat's smart, I never thought of that. Thanks!
- jimmyed 6y agoI have a modified go compiler which ignores the unused variable rule. If you are interested, I can share it with you.