MCPcopy
hub / github.com/pquerna/ffjson / RenderTemplate

Function RenderTemplate

inception/template.go:43–51  ·  view source on GitHub ↗
(ic *Inception)

Source from the content-addressed store, hash-verified

41`
42
43func RenderTemplate(ic *Inception) ([]byte, error) {
44 t := template.Must(template.New("ffjson.go").Parse(ffjsonTemplate))
45 buf := new(bytes.Buffer)
46 err := t.Execute(buf, ic)
47 if err != nil {
48 return nil, err
49 }
50 return format.Source(buf.Bytes())
51}
52
53func tplStr(t *template.Template, data interface{}) string {
54 buf := bytes.Buffer{}

Callers 1

ExecuteMethod · 0.85

Calls 2

ExecuteMethod · 0.80
BytesMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…