It seems that GO language does not have warnings in it. I've observed few instances. 1. "declared and not used"(if variable is declared and not used anywhere it gives an error and does not compile the program) 2. "imported and not used"(similarly if package is imported and not used anywhere it gives an error and does not compile the program) Can somebody help. If they have any pointers.
Go is trying to prevent this situation:
The boy is smoking and leaving smoke rings into the air. The girl gets irritated with the smoke and says to her lover: "Can't you see the warning written on the cigarettes packet, smoking is injurious to health!"
The boy replies back: "Darling, I am a programmer. We don't worry about warnings, we only worry about errors."
Basically, Go just wont let you get away with unused variables and unused imports and other stuff that is normally a warning on other languages. It helps put you in a good habit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With