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{} )