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

Struct InMemLoader

loader.go:89–92  ·  view source on GitHub ↗

InMemLoader is a simple in-memory loader storing template contents in a simple map. InMemLoader normalizes paths passed to its methods by converting any input path to a slash-delimited path, turning it into an absolute path by prepending a "/" if neccessary, and cleaning it (see path.Clean()). It is

Source from the content-addressed store, hash-verified

87// turning it into an absolute path by prepending a "/" if neccessary, and cleaning it (see path.Clean()).
88// It is safe for concurrent use.
89type InMemLoader struct {
90 lock sync.RWMutex
91 files map[string][]byte
92}
93
94// compile time check that we implement Loader
95var _ Loader = (*InMemLoader)(nil)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected