mirror of
https://github.com/golang/go
synced 2024-11-19 00:54:42 -07:00
a99e43fcff
In cases like: var foo []bytes.Buffer foo = append(foo, <>) you will now get a literal candidate "bytes.Buffer{}". Previously we were skipping all literal candidates at the variadic position, but the intention was to only skip literal slice candidates (i.e. "[]bytes.Buffer{}" in the above example). I also improved the literal struct snippet to not leave the cursor inside the curlies when the struct type has no accessible fields. Previously it was only checking if the struct had no fields at all. This means after completing in the above example you will end up with "bytes.Buffer{}<>" instead of "bytes.Buffer{<>}", where "<>" denotes the cursor. Change-Id: Ic2604a4ea65d84ad855ad6e6d98b8ab76eb08d77 Reviewed-on: https://go-review.googlesource.com/c/tools/+/207537 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
literal_snippets.go.in | ||
snippets.go.golden | ||
snippets.go.in |