gf/.example/other/test.go

15 lines
148 B
Go
Raw Normal View History

2017-11-23 10:21:28 +08:00
package main
2019-07-20 16:41:17 +08:00
2020-01-07 22:14:32 +08:00
import "fmt"
func main() {
2020-01-07 22:14:32 +08:00
type User struct {
Id int
}
u1 := &User{1}
u2 := *u1
u2.Id = 2
fmt.Println(u1)
fmt.Println(u2)
2019-07-20 16:41:17 +08:00
}