v1.16.3
ADDED: * Much more functions to tplx/sprigx
This commit is contained in:
@@ -25,6 +25,11 @@ func FuncMap() (fmap map[string]any) {
|
||||
for fn, f = range genericMap {
|
||||
fmap[fn] = f
|
||||
}
|
||||
if osGenericMap != nil && len(osGenericMap) > 0 {
|
||||
for fn, f = range osGenericMap {
|
||||
fmap[fn] = f
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
@@ -43,6 +48,12 @@ func HtmlFuncMap() (fmap htpl.FuncMap) {
|
||||
}
|
||||
}
|
||||
|
||||
if osHtmlMap != nil && len(osHtmlMap) > 0 {
|
||||
for fn, f = range osHtmlMap {
|
||||
fmap[fn] = f
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -60,5 +71,11 @@ func TxtFuncMap() (fmap ttpl.FuncMap) {
|
||||
}
|
||||
}
|
||||
|
||||
if osTxtMap != nil && len(osTxtMap) > 0 {
|
||||
for fn, f = range osTxtMap {
|
||||
fmap[fn] = f
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user