MCPcopy Create free account
hub / github.com/dnote/dnote / addTemplateExt

Function addTemplateExt

pkg/server/views/engine.go:110–114  ·  view source on GitHub ↗

addTemplateExt takes in a slice of strings representing file paths for templates and it appends the templateExt extension to each string in the slice Eg the input {"home"} would result in the output {"home.gohtml"} if templateExt == ".gohtml"

(files []string)

Source from the content-addressed store, hash-verified

108// Eg the input {"home"} would result in the output
109// {"home.gohtml"} if templateExt == ".gohtml"
110func addTemplateExt(files []string) {
111 for i, f := range files {
112 files[i] = f + TemplateExt
113 }
114}

Callers 1

getTargetFilesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected