github.com/v2fly/tools@v0.100.0/internal/lsp/testdata/fillstruct/fill_struct_partial.go.golden (about)

     1  -- suggestedfix_fill_struct_partial_17_2 --
     2  package fillstruct
     3  
     4  type StructPartialA struct {
     5  	PrefilledInt int
     6  	UnfilledInt  int
     7  	StructPartialB
     8  }
     9  
    10  type StructPartialB struct {
    11  	PrefilledInt int
    12  	UnfilledInt  int
    13  }
    14  
    15  func fill() {
    16  	a := StructPartialA{
    17  		PrefilledInt:   5,
    18  		UnfilledInt:    0,
    19  		StructPartialB: StructPartialB{},
    20  	} //@suggestedfix("}", "refactor.rewrite")
    21  	b := StructPartialB{
    22  		/* this comment should disappear */
    23  		PrefilledInt: 7, // This comment should be blown away.
    24  		/* As should
    25  		this one */
    26  	} //@suggestedfix("}", "refactor.rewrite")
    27  }
    28  
    29  -- suggestedfix_fill_struct_partial_23_2 --
    30  package fillstruct
    31  
    32  type StructPartialA struct {
    33  	PrefilledInt int
    34  	UnfilledInt  int
    35  	StructPartialB
    36  }
    37  
    38  type StructPartialB struct {
    39  	PrefilledInt int
    40  	UnfilledInt  int
    41  }
    42  
    43  func fill() {
    44  	a := StructPartialA{
    45  		PrefilledInt: 5,
    46  	} //@suggestedfix("}", "refactor.rewrite")
    47  	b := StructPartialB{
    48  		PrefilledInt: 7,
    49  		UnfilledInt:  0,
    50  	} //@suggestedfix("}", "refactor.rewrite")
    51  }
    52