// render prints the template to stdout.
486913
func render() error {
	tmpl, err := template.New("watch").Parse(source)
	if err != nil {
		return err
	}
	if err := tmpl.Execute(os.Stdout, make([]struct{}, aFew)); err != nil {
		return err
	}
	return nil
}
786966
func (t *TemplateEngine) Render(w io.Writer, name string, data interface{}) error {
	if templ, exist := t.cache[name]; exist {
		return templ.ExecuteTemplate(w, "_", data)
	}
	return fmt.Errorf("template %s could not be found", name)
}
1363651
func (bar *StatusBar) Render(writer io.Writer) error {
	bar.Lock()
	defer bar.Unlock()

	buffer := &bytes.Buffer{}

	if bar.status == nil {
		return nil
	}

	err := bar.format.Execute(buffer, bar.status)
	if err != nil {
		return fmt.Errorf(
			`error during rendering status bar: %s`,
			err,
		)
	}

	fmt.Fprintf(buffer, "\r")

	bar.last = escapeSequenceRegexp.ReplaceAllLiteralString(
		buffer.String(),
		``,
	)

	_, err = io.Copy(writer, buffer)
	if err != nil {
		return fmt.Errorf(
			`can't write status bar: %s`,
			err,
		)
	}

	return nil
}
867592
func (t *File_Template) Render(params map[string]*Value) (string, error) {
	sSet := stringset.New(len(params))
	replacementSlice := make([]string, 0, len(t.Param)*2)
	for k, param := range t.Param {
		replacementSlice = append(replacementSlice, k)
		if newVal, ok := params[k]; ok {
			if err := param.Accepts(newVal); err != nil {
				return "", fmt.Errorf("param %q: %s", k, err)
			}
			sSet.Add(k)
			replacementSlice = append(replacementSlice, newVal.JSONRender())
		} else if param.Default != nil {
			replacementSlice = append(replacementSlice, param.Default.JSONRender())
		} else {
			return "", fmt.Errorf("param %q: missing", k)
		}
	}
	if len(params) != sSet.Len() {
		unknown := make([]string, 0, len(params))
		for k := range params {
			if !sSet.Has(k) {
				unknown = append(unknown, k)
			}
		}
		sort.Strings(unknown)
		return "", fmt.Errorf("unknown parameters: %q", unknown)
	}

	r := strings.NewReplacer(replacementSlice...)

	return r.Replace(t.Body), nil
}
387748
func (tmpl PongoTemplate) Render(wr io.Writer, arg interface{}) (err error) {
	gls.With(gls.Values(map[interface{}]interface{}{"data": arg}), func() {
		err = tmpl.template.ExecuteWriter(p2.Context(arg.(map[string]interface{})), wr)
		if nil != err {
			if e, ok := err.(*p2.Error); ok {
				rerr := &revel.Error{
					Title:       "Template Execution Error",
					Path:        tmpl.TemplateName,
					Description: e.Error(),
					Line:        e.Line,
				}
				if revel.DevMode {
					rerr.SourceLines = tmpl.Content()
				}
				err = rerr
			}
		}
	})
	return err
}
459438
func (p *PageView) Render() vecty.ComponentOrHTML {
	return elem.Body(
		// Display a textarea on the right-hand side of the page.
		elem.Div(
			vecty.Markup(
				vecty.Style("float", "right"),
			),
			elem.TextArea(
				vecty.Markup(
					vecty.Style("font-family", "monospace"),
					vecty.Property("rows", 14),
					vecty.Property("cols", 70),

					// When input is typed into the textarea, update the local
					// component state and rerender.
					event.Input(func(e *vecty.Event) {
						p.Input = e.Target.Get("value").String()
						vecty.Rerender(p)
					}),
				),
				vecty.Text(p.Input), // initial textarea text.
			),
		),

		// Render the markdown.
		&Markdown{Input: p.Input},
	)
}
1370395
func (v *ShowView) Render(m trees.Markup) {
	//if we are allowed to query for styles then check and change display
	if ds, err := trees.GetStyle(m, "display"); err == nil {
		if strings.Contains(ds.Value, "none") {
			ds.Value = "block"
		}
	}
}
285007
func (renderer *HTMLTemplateRenderer) Render(template string, model Model) error {
	templates, err := renderer.provider.Provide()
	if err != nil {
		renderer.errorf(template, err)
		return err
	}
	setContentType(renderer.writer, ContentHTML)
	err = templates.ExecuteTemplate(renderer.writer, template, model)
	if err != nil {
		renderer.errorf(template, err)
		return err
	}
	return nil
}
531844
func (s *Service) render() ([]byte, error) {
	if err := s.Validate(); err != nil {
		return nil, err
	}
	conf := s.Conf()
	if conf.Transient {
		conf.ExecStopPost = "rm " + s.confPath()
	}
	return Serialize(s.Name(), conf)
}
612891
func (j JE) Render() map[string]string {

	if j.error == "" {
		if j.message == "" {
			return map[string]string{"code": fmt.Sprintf("%d", j.Code)}
		} else {
			return map[string]string{"code": fmt.Sprintf("%d", j.Code), "message": j.message}
		}
	} else {
		if j.message == "" {
			return map[string]string{"code": fmt.Sprintf("%d", j.Code), "error": j.error}
		} else {
			return map[string]string{"code": fmt.Sprintf("%d", j.Code), "error": j.error, "message": j.message}
		}
	}
}
28271
func (collection Collection) Render(context *qor.Context, name string, objects ...interface{}) template.HTML {
	seoSetting := collection.GetSEOSetting(context, name, objects...)
	return seoSetting.FormattedHTML(context)
}
627651
func (h HTML) Render(w io.Writer, binding interface{}) error {
	// Retrieve a buffer from the pool to write to.
	out := bufPool.Get()
	err := h.Templates.ExecuteTemplate(out, h.Name, binding)
	if err != nil {
		return err
	}

	if hw, ok := w.(http.ResponseWriter); ok {
		h.Head.Write(hw)
	}
	out.WriteTo(w)

	// Return the buffer to the pool.
	bufPool.Put(out)
	return nil
}
1242829
func (f *File) Render(spec *Specifier) (string, error) {
	ret, err := f.Template[spec.TemplateName].Render(spec.Params)
	if err != nil {
		err = fmt.Errorf("rendering %q: %s", spec.TemplateName, err)
	}
	return ret, err
}
1054045
func (c *Context) Render(code int, r render.Render) {
	c.Status(code)

	if !bodyAllowedForStatus(code) {
		r.WriteContentType(c.Writer)
		c.Writer.WriteHeaderNow()
		return
	}

	if err := r.Render(c.Writer); err != nil {
		panic(err)
	}
}
237317
func (r JsonpJSON) Render(w http.ResponseWriter) (err error) {
	r.WriteContentType(w)
	ret, err := json.Marshal(r.Data)
	if err != nil {
		return err
	}

	if r.Callback == "" {
		_, err = w.Write(ret)
		return err
	}

	callback := template.JSEscapeString(r.Callback)
	_, err = w.Write([]byte(callback))
	if err != nil {
		return err
	}
	_, err = w.Write([]byte("("))
	if err != nil {
		return err
	}
	_, err = w.Write(ret)
	if err != nil {
		return err
	}
	_, err = w.Write([]byte(")"))
	if err != nil {
		return err
	}

	return nil
}
973894
func (r Reader) Render(w http.ResponseWriter) (err error) {
	r.WriteContentType(w)
	r.Headers["Content-Length"] = strconv.FormatInt(r.ContentLength, 10)
	r.writeHeaders(w, r.Headers)
	_, err = io.Copy(w, r.Reader)
	return
}
552063
func (c *xContext) Render(name string, data interface{}, codes ...int) (err error) {
	if c.auto {
		format := c.Format()
		if render, ok := c.echo.formatRenderers[format]; ok && render != nil {
			switch v := data.(type) {
			case Data: //Skip
			case error:
				c.dataEngine.SetError(v)
			case nil:
				if c.dataEngine.GetData() == nil {
					c.dataEngine.SetData(c.Stored(), c.dataEngine.GetCode().Int())
				}
			default:
				c.dataEngine.SetData(data, c.dataEngine.GetCode().Int())
			}
			return render(c, data)
		}
	}
	c.dataEngine.SetTmplFuncs()
	if data == nil {
		data = c.dataEngine.GetData()
	}
	b, err := c.Fetch(name, data)
	if err != nil {
		return
	}
	b = bytes.TrimLeftFunc(b, unicode.IsSpace)
	c.response.Header().Set(HeaderContentType, MIMETextHTMLCharsetUTF8)
	err = c.Blob(b, codes...)
	return
}