Skip to content

Instantly share code, notes, and snippets.

@lettergram
Created March 18, 2015 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lettergram/096d24348b2b21304568 to your computer and use it in GitHub Desktop.
Save lettergram/096d24348b2b21304568 to your computer and use it in GitHub Desktop.
type Inventory struct {
Material string
Count uint
}
sweaters := Inventory{"wool", 17}
tmpl, _ := template.New("test").Parse("{{.Count}} items are made of {{.Material}}")
tmpl.Execute(os.Stdout, sweaters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment