github.com/v2fly/tools@v0.100.0/internal/lsp/testdata/fillstruct/a2.go.golden (about) 1 -- suggestedfix_a2_11_21 -- 2 package fillstruct 3 4 type typedStruct struct { 5 m map[string]int 6 s []int 7 c chan int 8 c1 <-chan int 9 a [2]string 10 } 11 12 var _ = typedStruct{ 13 m: map[string]int{}, 14 s: []int{}, 15 c: make(chan int), 16 c1: make(<-chan int), 17 a: [2]string{}, 18 } //@suggestedfix("}", "refactor.rewrite") 19 20 type funStruct struct { 21 fn func(i int) int 22 } 23 24 var _ = funStruct{} //@suggestedfix("}", "refactor.rewrite") 25 26 type funStructCompex struct { 27 fn func(i int, s string) (string, int) 28 } 29 30 var _ = funStructCompex{} //@suggestedfix("}", "refactor.rewrite") 31 32 type funStructEmpty struct { 33 fn func() 34 } 35 36 var _ = funStructEmpty{} //@suggestedfix("}", "refactor.rewrite") 37 38 -- suggestedfix_a2_17_19 -- 39 package fillstruct 40 41 type typedStruct struct { 42 m map[string]int 43 s []int 44 c chan int 45 c1 <-chan int 46 a [2]string 47 } 48 49 var _ = typedStruct{} //@suggestedfix("}", "refactor.rewrite") 50 51 type funStruct struct { 52 fn func(i int) int 53 } 54 55 var _ = funStruct{ 56 fn: func(i int) int { 57 }, 58 } //@suggestedfix("}", "refactor.rewrite") 59 60 type funStructCompex struct { 61 fn func(i int, s string) (string, int) 62 } 63 64 var _ = funStructCompex{} //@suggestedfix("}", "refactor.rewrite") 65 66 type funStructEmpty struct { 67 fn func() 68 } 69 70 var _ = funStructEmpty{} //@suggestedfix("}", "refactor.rewrite") 71 72 -- suggestedfix_a2_23_25 -- 73 package fillstruct 74 75 type typedStruct struct { 76 m map[string]int 77 s []int 78 c chan int 79 c1 <-chan int 80 a [2]string 81 } 82 83 var _ = typedStruct{} //@suggestedfix("}", "refactor.rewrite") 84 85 type funStruct struct { 86 fn func(i int) int 87 } 88 89 var _ = funStruct{} //@suggestedfix("}", "refactor.rewrite") 90 91 type funStructCompex struct { 92 fn func(i int, s string) (string, int) 93 } 94 95 var _ = funStructCompex{ 96 fn: func(i int, s string) (string, int) { 97 }, 98 } //@suggestedfix("}", "refactor.rewrite") 99 100 type funStructEmpty struct { 101 fn func() 102 } 103 104 var _ = funStructEmpty{} //@suggestedfix("}", "refactor.rewrite") 105 106 -- suggestedfix_a2_29_24 -- 107 package fillstruct 108 109 type typedStruct struct { 110 m map[string]int 111 s []int 112 c chan int 113 c1 <-chan int 114 a [2]string 115 } 116 117 var _ = typedStruct{} //@suggestedfix("}", "refactor.rewrite") 118 119 type funStruct struct { 120 fn func(i int) int 121 } 122 123 var _ = funStruct{} //@suggestedfix("}", "refactor.rewrite") 124 125 type funStructCompex struct { 126 fn func(i int, s string) (string, int) 127 } 128 129 var _ = funStructCompex{} //@suggestedfix("}", "refactor.rewrite") 130 131 type funStructEmpty struct { 132 fn func() 133 } 134 135 var _ = funStructEmpty{ 136 fn: func() { 137 }, 138 } //@suggestedfix("}", "refactor.rewrite") 139