go/internal/lsp/testdata/fillstruct
Jean de Klerk 0e8b1ee181 gopls, internal/lsp: support fillstruct for partially-filled structs
This updates fillstruct to work even when the struct is partially
filled. User supplied fields are preserved but comments are blown away.

Preserving comments appears to be very hard with the current ast
library. One possible option is to do manual string shenanigans, but
after exploring that path it seems like A Bad Idea.

Fixes golang/go#39804

Change-Id: Iec0bb93db05d4d726dfa6c77a8139f53b14bcc77
Reviewed-on: https://go-review.googlesource.com/c/tools/+/262018
Run-TryBot: Jean de Klerk <deklerk@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Jean de Klerk <deklerk@google.com>
2020-11-30 20:22:45 +00:00
..
data internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a2.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a2.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a3.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a3.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a4.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
a4.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_anon.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_anon.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_nested.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_nested.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_package.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_package.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_partial.go gopls, internal/lsp: support fillstruct for partially-filled structs 2020-11-30 20:22:45 +00:00
fill_struct_partial.go.golden gopls, internal/lsp: support fillstruct for partially-filled structs 2020-11-30 20:22:45 +00:00
fill_struct_spaces.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
fill_struct_spaces.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00