v1.16.0
ADDED: * tplx/sprigx
This commit is contained in:
40
tplx/sprigx/consts.go
Normal file
40
tplx/sprigx/consts.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package sprigx
|
||||
|
||||
import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var (
|
||||
// genericMap holds functions usable/intended for use in either an [html/template.FuncMap] or [text/template.FuncMap].
|
||||
genericMap map[string]any = map[string]any{
|
||||
// Debugging
|
||||
"dump": dump,
|
||||
// Strings
|
||||
"extIndent": extIndent, // PR in: https://github.com/Masterminds/sprig/pull/468
|
||||
// OS/System
|
||||
"sysArch": sysArch,
|
||||
"sysNumCpu": sysNumCpu,
|
||||
"sysOsName": sysOsNm,
|
||||
"sysRuntime": sysRuntime,
|
||||
// Paths: Generic
|
||||
"pathJoin": path.Join,
|
||||
"pathPipeJoin": pathPipeJoin,
|
||||
"pathSliceJoin": pathSliceJoin,
|
||||
"pathSlicePipeJoin": pathSlicePipeJoin,
|
||||
"pathSubJoin": pathSubJoin,
|
||||
// Paths: OS/Platform
|
||||
"osPathJoin": filepath.Join,
|
||||
"osPathPipeJoin": osPathPipeJoin,
|
||||
"osPathSep": osPathSep,
|
||||
"osPathSliceJoin": osPathSliceJoin,
|
||||
"osPathSlicePipeJoin": osPathSlicePipeJoin,
|
||||
"osPathSubJoin": osPathSubJoin,
|
||||
}
|
||||
|
||||
// htmlMap holds functions usable/intended for use in only an [html/template.FuncMap].
|
||||
htmlMap map[string]any = map[string]any{}
|
||||
|
||||
// txtMap holds functions usable/intended for use in only a [text/template.FuncMap].
|
||||
txtMap map[string]any = map[string]any{}
|
||||
)
|
||||
Reference in New Issue
Block a user