Commit 12049e3d authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Some documentation

parent f21db281
......@@ -13,6 +13,8 @@ type rawTemplate struct {
Outputs []map[string]interface{}
}
// The Template struct represents a parsed template, parsed into the most
// completed form it can be without additional processing by the caller.
type Template struct {
Name string
Builders map[string]rawBuilderConfig
......@@ -27,6 +29,8 @@ type rawBuilderConfig struct {
rawConfig interface{}
}
// ParseTemplate takes a byte slice and parses a Template from it, returning
// the template and possibly errors while loading the template.
func ParseTemplate(data []byte) (t *Template, err error) {
var rawTpl rawTemplate
err = json.Unmarshal(data, &rawTpl)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment