This package aims to provide an independent implementation of the Hugo template functions. https://gohugo.io/functions/ (view source)
Import the package:
import "github.com/drone/funcmap"
Provide the Funcmap when compiling your templates:
t, err := template.New("_").Funcs(funcmap.Funcs).Parse(text)
base64Decodebase64EncodejsonifyjsonEncodejsonDecodeyamlEncodeyamlDecode
appendchompcontainscontainsAnyfindREfirstUpperhasPrefixhasSuffixlowerpadLeftpadRightprependrepeatreplacereplaceREslicestrsplitsplitntitletrimtrimLefttrimRighttrimPrefixtrimSuffixupper