// WithTemplate assigns Template to Options.
12065
func WithTemplate(template io.Reader) Option {
	return func(setter OptionSetter) {
		setter.SetTemplate(template)
	}
}
358990
func PublishingTemplate(t amqp.Publishing) PublisherOpt {
	return func(p *Publisher) {
		p.tmpl = t
	}
}
378808
func (c *Controller) RenderTemplate(templatePath string) Result {
	c.setStatusIfNil(http.StatusOK)

	// Get the Template.
	lang, _ := c.ViewArgs[CurrentLocaleViewArg].(string)
	template, err := MainTemplateLoader.TemplateLang(templatePath, lang)
	if err != nil {
		return c.RenderError(err)
	}

	return &RenderTemplateResult{
		Template: template,
		ViewArgs: c.ViewArgs,
	}
}
746254
func (c *Client) DeleteTemplate(p *DeleteTemplateParameter) (*Result, error) {
	obj, err := c.Request("deleteTemplate", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
924742
func (t *Templater) Template(path string) (tpl *template.Template, ok bool) {
	t.m.Lock()
	defer t.m.Unlock()
	tpl, ok = t.templates[path]
	return
}
1356580
func (t *TemplateEngine) SetTemplates(templates ...string) {
	for _, template := range templates {
		t.templates = append(t.templates, template)
	}
}
770537
func Template() (c *TemplateController) {
	return &TemplateController{
		List:   templateList,
		New:    templateNew,
		Create: templateCreate,
		Edit:   templateEdit,
		Update: templateUpdate,
		Delete: templateDelete,
	}
}
252567
func (r *Router) Template(t *template.Template) {
	r.Lock()
	defer r.Unlock()
	r.views = template.Must(t.Clone())
}
131249
func (r *Registry) Template(name string) (Template, bool) {
	for _, t := range r.Templates {
		if t.Node.Name == name {
			return t, true
		}
	}
	return Template{}, false
}
1244605
func TransformTemplate(tpl *templatev1.Template, templateProcessor templateclientv1.TemplateProcessorInterface, namespace string, parameters map[string]string, ignoreUnknownParameters bool) (*templatev1.Template, error) {
	// only set values that match what's expected by the template.
	for k, value := range parameters {
		v := templateprocessing.GetParameterByName(tpl, k)
		if v != nil {
			v.Value = value
			v.Generate = ""
		} else if !ignoreUnknownParameters {
			return nil, fmt.Errorf("unexpected parameter name %q", k)
		}
	}

	name := localOrRemoteName(tpl.ObjectMeta, namespace)

	// transform the template
	result, err := templateProcessor.Process(tpl)
	if err != nil {
		return nil, fmt.Errorf("error processing template %q: %v", name, err)
	}

	return result, nil
}
858962
func (c *Client) CopyTemplate(p *CopyTemplateParameter) (*Template, error) {
	obj, err := c.Request("copyTemplate", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Template), err
}
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()
}
248732
func (s *SendTemplatedEmailInput) SetTemplate(v string) *SendTemplatedEmailInput {
	s.Template = &v
	return s
}
904353
func (client *Client) DeleteTemplate(ctx context.Context, templateID string) error {
	return client.request(ctx, "DELETE", "templates/"+templateID, nil, nil)
}
439954
func (r Configuration_Template) CopyTemplate(templateObject *datatypes.Configuration_Template) (resp datatypes.Configuration_Template, err error) {
	params := []interface{}{
		templateObject,
	}
	err = r.Session.DoRequest("SoftLayer_Configuration_Template", "copyTemplate", params, &r.Options, &resp)
	return
}
831361
func NewTemplate() *Template {
	return &Template{
		Conditions: make(map[string]interface{}),
		Outputs:    make(map[string]Output),
		Parameters: make(map[string]Parameter),
		Resources:  make(map[string]Resource),
	}
}
322654
func ExecuteTemplate(ctx iris.Context, tmpl templates.Partial) {
	ctx.Gzip(true)
	ctx.ContentType("text/html")
	templates.WriteTemplate(ctx.ResponseWriter(), tmpl)
}