Struct fields autocompletion
It would be nice if gocode offered completion of struct fields. I can do it on the client side by placing a dot after the type and then requesting completion from there but I'm wondering if this is something better implemented in gocode if possble that way all users of gocode can benefit
e.g.
package main
type T struct {
N int
S string
}
func main() {
t := T{
|cursor|<results in completion of globals>
}
}
Yeah, I thought about that, but don't know if and when I'll add this, shouldn't be too hard.
this would be very,very great. It appears that struct initialization is a very frequent code pattern.
At the moment, I'm pretty sure, I won't implement it soon. I'm in support-only mode for the gocode, because I don't really write much Go lately.
I'm tentatively working on this, and I almost have a version that works correctly, at least under certain conditions (identifier on its own at start of line).
I must type some char, and then gocode prompt available fields. But I want gocode auto show all available fields when I start open the struct brace. Can I do it, shall I make some configure?
@guileen It's editor specific, what editor are you using?