- Grouped globals
var config struct {
APIKey string
OAuthConfig oauth.Config
}
config.APIKey = "BADC0C0A"
- Template data
data := struct {
Title string
Users []*User
}{
title,
users,
}
err := tmpl.Execute(w, data)
(Cheaper and safer than using map[string]interface{}.)