This website works better with JavaScript.
Explore
Help
Sign In
lib
/
tmpl
Watch
1
Star
0
Fork
You've already forked tmpl
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
fa1dca3fd6
tmpl
/
tests
/
data
/
broken.template
2 lines
19 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Convert POC package to tested version Includes a Templates struct as a helper to generate templates using an io/fs filesystem interface. This adds options not available in the standard ParseFS provided by the Go standard library. • Only the base name is used for the name of templates. This means you can only look up one themplate by name from two different directories. For example, if directory "a" and directory "b" both have a template index.html, there is no way to specify using index.html for "a" or from "b" • Supports stripping a root directory and trimming a suffix to make importing templates easier Includes two helper functions • AsString takes a template with data and executes the template and returns a strin. • String is like AsString, but will ignore errors
4 years ago
{{ return_error }}