On Wed, Sep 14, 2016 at 11:51 AM, 'simon place' via golang-nuts <golang-nuts@googlegroups.com> wrote: > what about when you're writing a lib, can't the importing code make use of > constants?
No warning about an unused variable or constant would ever apply to an exported name. That would not make sense. Ian > On Monday, 12 September 2016 13:57:15 UTC+1, Markus Zimmermann wrote: >> >> Hi gophers! >> >> I am wondering why we have a "declared and not used" compile error for >> variables [https://play.golang.org/p/KLzHVO5L7q] but not for constants >> [https://play.golang.org/p/JG9dSa_VKg]? I am sure there is some rational >> decision behind this that I have missed, but my Google-fu is just not strong >> enough to find an answer. >> >> Cheers, >> Markus > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.