diff --git a/tplx/sprigx/README.html b/tplx/sprigx/README.html index 5b1f9a4..551a4a6 100644 --- a/tplx/sprigx/README.html +++ b/tplx/sprigx/README.html @@ -559,7 +559,7 @@ pre.rouge .gs {
They provide functions that offer more enriched use cases and domain-specific data.
|
+ Tip
+ |
+
+
+
+If you are reading this README on the Go Module Directory documentation (https://pkg.go.dev/r00t2.io/goutils/tplx/sprigx) +or the directory landing page (https://git.r00t2.io/r00t2/go_goutils/src/branch/master/tplx/sprigx), it may not render correctly. +
+
+Be sure to view it at properly via the AsciiDoc rendering +or by downloading and viewing the HTML version. + |
+
The same way you would sprig!
sprig!They can even be combined/used together.
+For example, if both sprig and sprigx provide a function foo:
this will use foo from sprigx
foo from sprigxwhereas
+whereas this will use foo from sprig
foo from sprigand a function can even be
+and a function can even be explicitly overridden.
This would override a function foo and foo2 in sprigx from foo and foo2 from sprig, but leave all other sprig functions untouched.
Expect this list to grow over time, and potentially more frequently than the sprigx functions.
sysArchosHostnameosHostname simply wraps and returns the result of calling os.Hostname.
As such, it comes with the same caveats - it’s possible for it to error, and it isn’t guaranteed to be an FQDN — it will be precisely/exactly whatever the kernel’s hostname is set as.
+sysArchReturns the runtime.GOARCH constant.
sysRuntimesysRuntimeThis function returns a map[string]string of various information from the runtime stdlib library.
These operate similar to the path stdlib library and use a fixed / path separator.
pathJoinpathJoinpathJoin operates exactly like path.Join in stdlib.
If you are joining paths in a pipeline, you almost assuredly want pathPipeJoin or pathSlicePipeJoin instead.
If you are joining paths in a pipeline, you almost assuredly want pathPipeJoin or pathSlicePipeJoin instead unless you are explicitly appending a pipeline result to a path.
pathPipeJoinpathPipeJoinpathPipeJoin operates like pathJoin with one deviation: the root/base path is expected to be last in the arguments.
pathSliceJoinpathSliceJoinpathSliceJoin joins a slice of path segment strings ([]string) instead of a variadic sequence of strings.
pathSlicePipeJoinpathSlicePipeJoinpathSlicePipeJoin operates like pathPipeJoin in that it is suitable for pipeline use in which the root/base path is passed in from the pipeline, but it is like pathSliceJoin in that it then also accepts a slice of path segments ([]string) to append to that base path.
pathSubJoinpathSubJoinpathSubJoin operates like pathJoin but it expects an explicit root/base path.
These operate similar to the path/filepath stdlib library, and use the OS-specific os.PathSeparator.
osPathJoinosPathJoinosPathJoin operates exactly like path/filepath.Join in stdlib.
If you are joining paths in a pipeline, you almost assuredly want osPathPipeJoin or osPathSlicePipeJoin instead.
If you are joining paths in a pipeline, you almost assuredly want osPathPipeJoin or osPathSlicePipeJoin instead unless you are explicitly appending a pipeline result to a path.
osPathPipeJoinosPathPipeJoinosPathPipeJoin operates like pathPipeJoin (except using OS-specific path separators).
osPathSeposPathSeposPathSep returns the os.PathSeparator for this OS.
osPathSliceJoinosPathSliceJoinosPathSliceJoin operates like pathSliceJoin but with OS-specific path separators.
osPathSlicePipeJoinosPathSlicePipeJoinosPathSlicePipeJoin operates like pathSlicePipeJoin but with OS-specific separators.
osPathSubJoinosPathSubJoinosPathSubJoin operates like pathSubJoin but with OS-specific separators.
extIndentextIndentextIndent allows for a MUCH more flexible indenter than the sprig indent function.
It works with both Windows (\r\n) and POSIX (\n) linebreaks.
|
+ Tip
+ |
+
+
+
+If |
+
It has quite a few arguments, however:
dumpThe dump function calls the Sdump function from go-spew (github.com/davecgh/go-spew/spew) for whatever object(s) is/are passed to it.