docs: add Sprig library functions to help topics

This commit is contained in:
Kynan Ware 2025-03-26 10:21:41 -06:00
parent efa1825eff
commit ffd42ea256

View file

@ -151,6 +151,13 @@ var HelpTopics = []helpTopic{
- %[1]struncate <length> <input>%[1]s: ensures input fits within length
- %[1]shyperlink <url> <text>%[1]s: renders a terminal hyperlink
The following Sprig template library functions can also be used with this formatting directive:
- %[1]scontains%[1]s: returns true if the input contains the argument
- %[1]shasPrefix%[1]s: returns true if the input has the argument as a prefix
- %[1]shasSuffix%[1]s: returns true if the input has the argument as a suffix
- %[1]sregexMatch%[1]s: returns true if the input matches the argument
For more information about the Sprig library, see <https://masterminds.github.io/sprig/>.
To learn more about Go templates, see: <https://golang.org/pkg/text/template/>.
`, "`"),
example: heredoc.Doc(`