1-- suggestedfix_a3_17_13 -- 2package fillstruct 3 4import ( 5 "go/ast" 6 "go/token" 7) 8 9type Foo struct { 10 A int 11} 12 13type Bar struct { 14 X *Foo 15 Y *Foo 16} 17 18var _ = Bar{ 19 X: &Foo{}, 20 Y: &Foo{}, 21} //@suggestedfix("}", "refactor.rewrite") 22 23type importedStruct struct { 24 m map[*ast.CompositeLit]ast.Field 25 s []ast.BadExpr 26 a [3]token.Token 27 c chan ast.EmptyStmt 28 fn func(ast_decl ast.DeclStmt) ast.Ellipsis 29 st ast.CompositeLit 30} 31 32var _ = importedStruct{} //@suggestedfix("}", "refactor.rewrite") 33 34type pointerBuiltinStruct struct { 35 b *bool 36 s *string 37 i *int 38} 39 40var _ = pointerBuiltinStruct{} //@suggestedfix("}", "refactor.rewrite") 41 42var _ = []ast.BasicLit{ 43 {}, //@suggestedfix("}", "refactor.rewrite") 44} 45 46var _ = []ast.BasicLit{{}} //@suggestedfix("}", "refactor.rewrite") 47 48-- suggestedfix_a3_28_24 -- 49package fillstruct 50 51import ( 52 "go/ast" 53 "go/token" 54) 55 56type Foo struct { 57 A int 58} 59 60type Bar struct { 61 X *Foo 62 Y *Foo 63} 64 65var _ = Bar{} //@suggestedfix("}", "refactor.rewrite") 66 67type importedStruct struct { 68 m map[*ast.CompositeLit]ast.Field 69 s []ast.BadExpr 70 a [3]token.Token 71 c chan ast.EmptyStmt 72 fn func(ast_decl ast.DeclStmt) ast.Ellipsis 73 st ast.CompositeLit 74} 75 76var _ = importedStruct{ 77 m: map[*ast.CompositeLit]ast.Field{}, 78 s: []ast.BadExpr{}, 79 a: [3]token.Token{}, 80 c: make(chan ast.EmptyStmt), 81 fn: func(ast_decl ast.DeclStmt) ast.Ellipsis { 82 }, 83 st: ast.CompositeLit{}, 84} //@suggestedfix("}", "refactor.rewrite") 85 86type pointerBuiltinStruct struct { 87 b *bool 88 s *string 89 i *int 90} 91 92var _ = pointerBuiltinStruct{} //@suggestedfix("}", "refactor.rewrite") 93 94var _ = []ast.BasicLit{ 95 {}, //@suggestedfix("}", "refactor.rewrite") 96} 97 98var _ = []ast.BasicLit{{}} //@suggestedfix("}", "refactor.rewrite") 99 100-- suggestedfix_a3_36_30 -- 101package fillstruct 102 103import ( 104 "go/ast" 105 "go/token" 106) 107 108type Foo struct { 109 A int 110} 111 112type Bar struct { 113 X *Foo 114 Y *Foo 115} 116 117var _ = Bar{} //@suggestedfix("}", "refactor.rewrite") 118 119type importedStruct struct { 120 m map[*ast.CompositeLit]ast.Field 121 s []ast.BadExpr 122 a [3]token.Token 123 c chan ast.EmptyStmt 124 fn func(ast_decl ast.DeclStmt) ast.Ellipsis 125 st ast.CompositeLit 126} 127 128var _ = importedStruct{} //@suggestedfix("}", "refactor.rewrite") 129 130type pointerBuiltinStruct struct { 131 b *bool 132 s *string 133 i *int 134} 135 136var _ = pointerBuiltinStruct{ 137 b: new(bool), 138 s: new(string), 139 i: new(int), 140} //@suggestedfix("}", "refactor.rewrite") 141 142var _ = []ast.BasicLit{ 143 {}, //@suggestedfix("}", "refactor.rewrite") 144} 145 146var _ = []ast.BasicLit{{}} //@suggestedfix("}", "refactor.rewrite") 147 148-- suggestedfix_a3_39_3 -- 149package fillstruct 150 151import ( 152 "go/ast" 153 "go/token" 154) 155 156type Foo struct { 157 A int 158} 159 160type Bar struct { 161 X *Foo 162 Y *Foo 163} 164 165var _ = Bar{} //@suggestedfix("}", "refactor.rewrite") 166 167type importedStruct struct { 168 m map[*ast.CompositeLit]ast.Field 169 s []ast.BadExpr 170 a [3]token.Token 171 c chan ast.EmptyStmt 172 fn func(ast_decl ast.DeclStmt) ast.Ellipsis 173 st ast.CompositeLit 174} 175 176var _ = importedStruct{} //@suggestedfix("}", "refactor.rewrite") 177 178type pointerBuiltinStruct struct { 179 b *bool 180 s *string 181 i *int 182} 183 184var _ = pointerBuiltinStruct{} //@suggestedfix("}", "refactor.rewrite") 185 186var _ = []ast.BasicLit{ 187 { 188 ValuePos: 0, 189 Kind: 0, 190 Value: "", 191 }, //@suggestedfix("}", "refactor.rewrite") 192} 193 194var _ = []ast.BasicLit{{}} //@suggestedfix("}", "refactor.rewrite") 195 196-- suggestedfix_a3_42_25 -- 197package fillstruct 198 199import ( 200 "go/ast" 201 "go/token" 202) 203 204type Foo struct { 205 A int 206} 207 208type Bar struct { 209 X *Foo 210 Y *Foo 211} 212 213var _ = Bar{} //@suggestedfix("}", "refactor.rewrite") 214 215type importedStruct struct { 216 m map[*ast.CompositeLit]ast.Field 217 s []ast.BadExpr 218 a [3]token.Token 219 c chan ast.EmptyStmt 220 fn func(ast_decl ast.DeclStmt) ast.Ellipsis 221 st ast.CompositeLit 222} 223 224var _ = importedStruct{} //@suggestedfix("}", "refactor.rewrite") 225 226type pointerBuiltinStruct struct { 227 b *bool 228 s *string 229 i *int 230} 231 232var _ = pointerBuiltinStruct{} //@suggestedfix("}", "refactor.rewrite") 233 234var _ = []ast.BasicLit{ 235 {}, //@suggestedfix("}", "refactor.rewrite") 236} 237 238var _ = []ast.BasicLit{{ 239 ValuePos: 0, 240 Kind: 0, 241 Value: "", 242}} //@suggestedfix("}", "refactor.rewrite") 243 244