Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active January 31, 2022 21:48
Show Gist options
  • Save ihcsim/db01f92fd9bad0ea7240b9e289cc7cca to your computer and use it in GitHub Desktop.
Save ihcsim/db01f92fd9bad0ea7240b9e289cc7cca to your computer and use it in GitHub Desktop.
type Service struct {
name string
namespace string
}
func main() {
svcs := []Service{
{
name: "nginx",
namespace: "default",
},
{
name: "haproxy",
namespace: "default",
},
}
for _, svc := range svcs {
fmt.Printf("%+v\n", svc)
}
fmt.Printf("%+v\n", svcs)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment