MCPcopy
hub / github.com/kopia/kopia / GetEmbeddedTemplate

Function GetEmbeddedTemplate

notification/notifytemplate/embeddedtemplate.go:111–118  ·  view source on GitHub ↗

GetEmbeddedTemplate returns embedded template by name.

(templateName string)

Source from the content-addressed store, hash-verified

109
110// GetEmbeddedTemplate returns embedded template by name.
111func GetEmbeddedTemplate(templateName string) (string, error) {
112 b, err := embedded.ReadFile(templateName)
113 if err != nil {
114 return "", errors.Wrap(err, "unable to read embedded template")
115 }
116
117 return string(b), nil
118}
119
120// SupportedTemplates returns a list of supported template names.
121func SupportedTemplates() []string {

Callers 4

verifyTemplateFunction · 0.92
runMethod · 0.92
launchEditorMethod · 0.92
ResolveTemplateFunction · 0.85

Calls

no outgoing calls

Tested by 1

verifyTemplateFunction · 0.74