github.com/songshiyun/revive@v1.1.5-0.20220323112655-f8433a19b3c5/testdata/modifies-value-receiver.go (about)

     1  package fixtures
     2  
     3  type data struct {
     4  	num   int
     5  	key   *string
     6  	items map[string]bool
     7  }
     8  
     9  func (this data) vmethod() {
    10  	this.num = 8 // MATCH /suspicious assignment to a by-value method receiver/
    11  	*this.key = "v.key"
    12  	this.items["vmethod"] = true
    13  }