diff options
Diffstat (limited to 'gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden')
-rw-r--r-- | gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden b/gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden new file mode 100644 index 000000000..de01a40f0 --- /dev/null +++ b/gopls/internal/lsp/testdata/fillstruct/fill_struct.go.golden @@ -0,0 +1,124 @@ +-- suggestedfix_fill_struct_20_15 -- +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{ + unexportedIntField: 0, + ExportedIntField: 0, + MapA: map[int]string{}, + Array: []int{}, + StructB: StructB{}, + } //@suggestedfix("}", "refactor.rewrite", "Fill") + b := StructA2{} //@suggestedfix("}", "refactor.rewrite", "Fill") + c := StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + if true { + _ = StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + } +} + +-- suggestedfix_fill_struct_21_16 -- +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{ + B: &StructB{}, + } //@suggestedfix("}", "refactor.rewrite", "Fill") + c := StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + if true { + _ = StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + } +} + +-- suggestedfix_fill_struct_22_16 -- +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{ + B: StructB{}, + } //@suggestedfix("}", "refactor.rewrite", "Fill") + if true { + _ = StructA3{} //@suggestedfix("}", "refactor.rewrite", "Fill") + } +} + +-- suggestedfix_fill_struct_24_16 -- +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{ + B: StructB{}, + } //@suggestedfix("}", "refactor.rewrite", "Fill") + } +} + |