github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/method16b.gno (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  type Cheese struct {
     8  	Property string
     9  }
    10  
    11  func (t *Cheese) Hello(param string) {
    12  	fmt.Printf("%+v %+v", t, param)
    13  }
    14  
    15  func main() {
    16  	(*Cheese).Hello(&Cheese{Property: "value"}, "param")
    17  }
    18  
    19  // Output:
    20  // &{Property:value} param