1 Commits (c857092d2754)

Author SHA1 Message Date
Buddy Sandidge fa1dca3fd6 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
3 years ago