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

Method Open

loader.go:51–51  ·  view source on GitHub ↗

Open returns the template's contents or an error if something went wrong. Calls to Open() will always be preceded by a call to Exists() with the same `templatePath`. It is the caller's duty to close the template.

(templatePath string)

Source from the content-addressed store, hash-verified

49 // Calls to Open() will always be preceded by a call to Exists() with the same `templatePath`.
50 // It is the caller's duty to close the template.
51 Open(templatePath string) (io.ReadCloser, error)
52}
53
54// OSFileSystemLoader implements Loader interface using OS file system (os.File).

Callers 6

TestZeroLoadersFunction · 0.95
loadFromFileMethod · 0.65
OpenMethod · 0.65
OpenMethod · 0.65
OpenMethod · 0.65
OpenMethod · 0.65

Implementers 5

InMemLoaderloader.go
Multiloaders/multi/multi.go
httpFileSystemLoaderloaders/httpfs/loader.go
embedFileSystemLoaderloaders/embedfs/loader.go

Calls

no outgoing calls

Tested by 1

TestZeroLoadersFunction · 0.76