To Run
go run main.go maps-eg.go
type person struct{
f_name string
l_prop2 int
...
propn int
}
-
user1 := person{"Vir", "li", ..., propVal}}
-
Method #2
user2 := person{ firstName: "John", lastName: "Doe", }
-
Method #3
var user3 person // fmt.Printf("%+v", user3) // display props name user3.firstName = "FirstNAME" user3.lastName = "LastNAME" user3.contact.email = "ankso@ankso.com" // if it has nested strct user3.contact.zipCode = 12322