mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-12-01 09:26:04 +03:00
22 lines
288 B
Go
22 lines
288 B
Go
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type user struct {
|
||
|
name string
|
||
|
email string
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
users := []user{
|
||
|
{"Bill", "bill@email.com"},
|
||
|
{"Lisa", "lisa@email.com"},
|
||
|
{"Nancy", "nancy@email.com"},
|
||
|
{"Paul", "paul@email.com"},
|
||
|
}
|
||
|
|
||
|
for i, u := range users {
|
||
|
fmt.Println(i, u)
|
||
|
}
|
||
|
}
|