// MustGet a template by name, panics when fails
485590
func (t *Repository) MustGet(name string) *template.Template {
	tpl, err := t.Get(name)
	if err != nil {
		panic(err)
	}
	return tpl
}
105149
func (loader *MapLoader) LoadTemplate(name string) (string, error) {
	if src, ok := (*loader)[name]; ok {
		return src, nil
	}
	return "", Errorf("Could not find template " + name)
}
232971
func MustGetProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) {
	r, err := GetProperty(disp, name, params...)
	if err != nil {
		panic(err.Error())
	}
	return r
}
424945
func (st *Runtime) YieldTemplate(name string, context interface{}) {

	t, err := st.set.GetTemplate(name)
	if err != nil {
		panic(fmt.Errorf("include: template %q was not found", name))
	}

	st.newScope()
	st.blocks = t.processedBlocks

	Root := t.Root
	if t.extends != nil {
		Root = t.extends.Root
	}

	if context != nil {
		c := st.context
		st.context = reflect.ValueOf(context)
		st.executeList(Root)
		st.context = c
	} else {
		st.executeList(Root)
	}

	st.releaseScope()
}
67689
func (tpl *Template) MustExec(ctx interface{}) string {
	result, err := tpl.Exec(ctx)
	if err != nil {
		panic(err)
	}
	return result
}
157191
func (d *Dispatch) MustGet(name string, params ...interface{}) (result *VARIANT) {
	id, err := d.GetId(name)
	if err != nil {
		panic(err)
	}

	result, err = d.Invoke(id, DISPATCH_PROPERTYGET, params)
	if err != nil {
		panic(err)
	}
	return
}
822200
func (t *Template) GetAWSWAFSqlInjectionMatchSetWithName(name string) (*resources.AWSWAFSqlInjectionMatchSet, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSWAFSqlInjectionMatchSet:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSWAFSqlInjectionMatchSet not found", name)
}
942162
func (client *Client) GetTemplate(ctx context.Context, templateID string) (template Template, err error) {
	err = client.request(ctx, "GET", "templates/"+templateID, nil, &template)
	return template, err
}
358901
func (c *FakeTemplates) Get(name string, options v1.GetOptions) (result *template.Template, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(templatesResource, c.ns, name), &template.Template{})

	if obj == nil {
		return nil, err
	}
	return obj.(*template.Template), err
}
1190328
func (f ES6Formatter) Template(name string) (string, string) {
	return ES6Identifier(name), "export function " + ES6Identifier(name)
}
1356418
func (t *Repository) Get(name string) (*template.Template, error) {
	templ, found := t.templates[name]

	if !found {
		return templ, fmt.Errorf("Template doesn't exist %s", name)
	}

	return t.addDependencies(templ)
}
110410
func (s *Session) MustGet(key string) interface{} {
	if value, exists := s.Get(key); exists {
		return value
	}

	panic("Key \"" + key + "\" does not exist")
}
1361703
func (r Resource_Group) GetTemplate() (resp datatypes.Resource_Group_Template, err error) {
	err = r.Session.DoRequest("SoftLayer_Resource_Group", "getTemplate", nil, &r.Options, &resp)
	return
}
425485
func (t *templateHandler) AddTemplate(name, tpl string) error {
	h := t.getTemplateHandler(name)
	_, err := h.addTemplate(name, tpl)
	if err != nil {
		return err
	}
	return nil
}
210543
func NewGetTemplateResult(Name string, Description string, Fields []*PropertyFieldTemplate) *GetTemplateResult {
	s := new(GetTemplateResult)
	s.Name = Name
	s.Description = Description
	s.Fields = Fields
	return s
}
1322570
func (f *Value) MustGet() interface{} {
	value, err := f.Get()
	if err != nil {
		panic(fmt.Sprintf("get returned error: %s", err))
	}
	return value
}
1275586
func loadTemplate(name string, path string) {
	// Read the html template file.
	data, err := ioutil.ReadFile(path)
	if err != nil {
		log.Fatalln(err)
	}

	// Create a template value for this code.
	tmpl, err := template.New(name).Parse(string(data))
	if err != nil {
		log.Fatalln(err)
	}

	// Have we processed this file already?
	if _, exists := views[name]; exists {
		log.Fatalf("Template %s already in use.", name)
	}

	// Store the template for use.
	views[name] = tmpl
}