modulepackage
0.0.22
Repository: https://github.com/caltechlibrary/tmplfn.git
Documentation: pkg.go.dev
# README
DEPRECATED
This package was original written to support mkpage but is no longer being maintained for that purpose. Eventually this repository will be archived. RSD 2020-08-05.
tmplfn package
tmplfn package provides an additional set of common functions (e.g. standardized date formatting) to use with Go's text/template and html/template packages.
It is also possible to use tmplfn to create filters for data records based on the pipeline that would be passed to an if clause in a text template.
# Packages
No description provided by the author
# Functions
AllFuncs() returns a Join of func maps available in tmplfn.
Join take one or more func maps and returns an aggregate one.
New creates a pointer to a template.Template and empty map of names to byte arrays pointing at an empty byte array.
ParseFilter parses a byte slice and returns a Filter struct and error.
# Constants
No description provided by the author
# Variables
Booleans provides a set of functions working with Boolean data.
Console holds functions that interact with the console where the template processing is happening (e.g.
Dotpath methods from datatools/dotpath in templates.
Iterables produces lists that then can supply the template range function with values.
No description provided by the author
No description provided by the author
Path methods for working with paths (E.g.
RegExp holds function that work off of Go's (not pcre) regular expression library.
No description provided by the author
No description provided by the author
Time provides a common set of time/date related functions for use in text/template or html/template.
Url methods are for working with URLs and extracting useful parts.