I am learning Google\'s new language Go. I am just trying stuff out and I noticed that if you declare a variable and do not do anything with it the go compiler (8g
If you really just wanna remove the compile error, you can try something like 'a = a', or 'error = error'.
The arguments coming from some people here, stating that such compile errors are great because they prevent a lot of cruft are true for most situation, so you should avoid such constructs. On the other side I quite like to test, whether the code I write does actually compile! And in that case it's good, not having to remove all declared & unused variables. So use the 'a = a' construct rarely and don't leave them there!