mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
36 lines
776 B
Go
36 lines
776 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func main() {
|
|
|
|
customers := GetCustomers()
|
|
|
|
for _, customer := range customers {
|
|
//we can access the "customer" variable in this approach
|
|
fmt.Println(customer)
|
|
}
|
|
|
|
}
|
|
|
|
func getData() (customers []string) {
|
|
|
|
customers = []string{ "Marcel Dempers", "Bob Smith", "John Smith"}
|
|
|
|
customers = append(customers, "Ben Spain")
|
|
customers = append(customers, "Aleem Janmohamed")
|
|
customers = append(customers, "Jamie le Notre")
|
|
customers = append(customers, "Victor Savkov")
|
|
customers = append(customers, "P The Admin")
|
|
customers = append(customers, "Adrian Oprea")
|
|
customers = append(customers, "Jonathan D")
|
|
|
|
for _, customer := range customers {
|
|
|
|
fmt.Println(customer)
|
|
}
|
|
|
|
return customers
|
|
} |