package main import ( "fmt" ) type User struct { username string password string age int } func main() { var user User user.username = "root" user.password = "123456" user.age = 15 fmt.Println(user) user2 := User{ username: "admin", password: "123456", age: 16, } fmt.Println(user2) user3 := User{"nomal","123456",18} fmt.Println(user3) }