FAQ
I don't know, there's already some go vet checks for comparisons that will
always be true or false. It doesn't seem unreasonable to add another.
  There's pretty much never a time when this isn't a programmer mistake. If
you really want an infinite loop, you'd just leave out the center
expression.
On Sunday, February 28, 2016 at 12:33:52 PM UTC-5, ohir wrote:

Dnia 2016-02-28, o godz. 08:18:20
dlin <dli...@gmail.com <javascript:>> napisał(a):

I know of no go linters that can spot bugs in otherwise valid
program logic. (k <= 255 is always true for 8 bit uint).

for k := uint8(250); k<=255; k++ {
fmt.Println("k=", k)
}
--
Wojciech S. Czarnecki
^oo^ OHIR-RIPE
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 28, '16 at 4:18p
activeFeb 29, '16 at 5:02p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase