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
| 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. |
| 89 | type InMemLoader struct { |
| 90 | lock sync.RWMutex |
| 91 | files map[string][]byte |
| 92 | } |
| 93 | |
| 94 | // compile time check that we implement Loader |
| 95 | var _ Loader = (*InMemLoader)(nil) |
nothing calls this directly
no outgoing calls
no test coverage detected