tss/exp/ref/main.go
2022-05-01 19:13:27 -04:00

27 lines
310 B
Go

package main
import "fmt"
type dummy struct {
name string
}
func main() {
fmt.Println("vim-go")
dummies := []dummy{
dummy{"foo"},
dummy{"bar"},
dummy{"baz"},
}
for i, _ := range dummies {
dum := &dummies[i]
dum.name = "hello"
}
for _, dum := range dummies {
fmt.Println(dum.name)
}
}