Structs
Struct
package main import "fmt" type person struct { name string age int favFood []string } func main() { favFood := []string{"guacamole", "omelet", "biscuits and gravy"} chloe := person{"chloe", 26, favFood} fmt.Println(chloe) }
Specifying values in Struct
Using Struct
Last updated