diff options
Diffstat (limited to 'gopls/internal/lsp/testdata/fillstruct/fill_struct.go')
-rw-r--r-- | gopls/internal/lsp/testdata/fillstruct/fill_struct.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/fillstruct/fill_struct.go b/gopls/internal/lsp/testdata/fillstruct/fill_struct.go new file mode 100644 index 000000000..3da904741 --- /dev/null +++ b/gopls/internal/lsp/testdata/fillstruct/fill_struct.go @@ -0,0 +1,26 @@ +package fillstruct + +type StructA struct { + unexportedIntField int + ExportedIntField int + MapA map[int]string + Array []int + StructB +} + +type StructA2 struct { + B *StructB +} + +type StructA3 struct { + B StructB +} + +func fill() { + a := StructA{} //@suggestedfix("}", "refactor.rewrite", "Fill") + b := StructA2{} //@suggestedfix("}", "refactor.rewrite", "Fill") + c := StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + if true { + _ = StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + } +} |