MCPcopy Create free account
hub / github.com/CloudyKit/jet / Set

Method Set

loader.go:132–137  ·  view source on GitHub ↗

Set adds a template to the loader.

(templatePath, contents string)

Source from the content-addressed store, hash-verified

130
131// Set adds a template to the loader.
132func (l *InMemLoader) Set(templatePath, contents string) {
133 templatePath = l.normalize(templatePath)
134 l.lock.Lock()
135 defer l.lock.Unlock()
136 l.files[templatePath] = []byte(contents)
137}
138
139// Delete removes whatever contents are stored under the given path.
140func (l *InMemLoader) Delete(templatePath string) {

Callers 7

TestExecuteConcurrencyFunction · 0.95
ExampleRangerFunction · 0.95
TestParseDoesNotCacheFunction · 0.95
TestEvalAutoescapeFunction · 0.95
TestRecursiveIncludeFunction · 0.95
BenchmarkFieldAccessFunction · 0.95

Calls 1

normalizeMethod · 0.95

Tested by 7

TestExecuteConcurrencyFunction · 0.76
ExampleRangerFunction · 0.76
TestParseDoesNotCacheFunction · 0.76
TestEvalAutoescapeFunction · 0.76
TestRecursiveIncludeFunction · 0.76
BenchmarkFieldAccessFunction · 0.76