gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/composite2.go (about)

     1  package main
     2  
     3  import "fmt"
     4  
     5  var a = &[]*T{{"hello"}}
     6  
     7  type T struct{ name string }
     8  
     9  func main() {
    10  	fmt.Println((*a)[0])
    11  }
    12  
    13  // Output:
    14  // &{hello}