Slim-Sprig Function Documentation
The Slim-Sprig library provides over 70 template functions for Go’s template language.
- String Functions:
trim
,plural
, etc.- String List Functions:
splitList
,sortAlpha
, etc.
- String List Functions:
- Integer Math Functions:
add
,max
,mul
, etc.- Integer Slice Functions:
until
,untilStep
- Integer Slice Functions:
- Date Functions:
now
,date
, etc. - Defaults Functions:
default
,empty
,coalesce
,fromJson
,toJson
,toPrettyJson
,toRawJson
,ternary
- Encoding Functions:
b64enc
,b64dec
, etc. - Lists and List Functions:
list
,first
,uniq
, etc. - Dictionaries and Dict Functions:
get
,set
,dict
,hasKey
,pluck
,dig
, etc. - Type Conversion Functions:
atoi
,int64
,toString
, etc. - Path and Filepath Functions:
base
,dir
,ext
,clean
,isAbs
,osBase
,osDir
,osExt
,osClean
,osIsAbs
- Flow Control Functions:
fail
- Advanced Functions
- OS Functions:
env
,expandenv
- Reflection:
typeOf
,kindIs
,typeIsLike
, etc. - Cryptographic and Security Functions:
sha256sum
, etc.
- OS Functions: