MCPcopy Create free account
hub / github.com/appleboy/CodeGPT / GetTemplateByString

Function GetTemplateByString

util/template.go:56–59  ·  view source on GitHub ↗

GetTemplateByString returns the parsed template as a string. It returns an error if the template processing fails.

(name string, data map[string]any)

Source from the content-addressed store, hash-verified

54// GetTemplateByString returns the parsed template as a string.
55// It returns an error if the template processing fails.
56func GetTemplateByString(name string, data map[string]any) (string, error) {
57 tpl, err := processTemplate(name, data)
58 return tpl.String(), err
59}
60
61// GetTemplateByBytes returns the parsed template as a byte slice.
62// It returns an error if the template processing fails.

Callers 2

review.goFile · 0.92
commit.goFile · 0.92

Calls 2

processTemplateFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected