gocode
gocode copied to clipboard
Missing second variable in select statements.
package main
import "time"
func test() {
t := time.NewTicker(time.Second)
select {
case foo, ok := <-t.C:
#
}
}
"ok" is not visible there. I consider it as low priority, because "ok" is always a boolean and has no members, so the chance that you actually need autocompletion for it is low. But might worth fixing it one day. Gocode has mechanisms for infering such types with a map indexing statement. Shouldn't be too hard to add this one as well.
@nsf I tried also
https://github.com/nsf/gocode/commit/77f5eaf94d9ac800c1683b63484a459c63a80ec7, but yeah doesn't visible ok. so give up. But understand you opinion.
BTW, sorry nit:
select {
case foo, ok := <-t.C: # it's token.DEFINE
#
}
Fixed.