tplfuncs
Go module with some useful template.FuncMap goodies
Areas of concern
- Spacing (
newline
andspace
) - Lines (line-wise processing of input string using
trim
,head
,tail
, and more) - Filesystem (
glob
,ensureDir
,fileExists
,dirExists
,ensureDir
,isMinFileSize
) - Exec (command execution and output capturing)
- Strings (string casing, making safe filenames and URLs,
stringContains
) - IO (
readFile
,include
,writeFile
) - Hashing (
sha1
,sha256
) - Env (
envIsSet
,env
,envEq
) - HTML (
safeHTML
,safeCSS
,safeJS
)