From ffd42ea256a78dd852579f627365888dd5ad9b56 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:21:41 -0600 Subject: [PATCH] docs: add Sprig library functions to help topics --- pkg/cmd/root/help_topic.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/cmd/root/help_topic.go b/pkg/cmd/root/help_topic.go index 2b6432ef9..df5a2e0c6 100644 --- a/pkg/cmd/root/help_topic.go +++ b/pkg/cmd/root/help_topic.go @@ -151,6 +151,13 @@ var HelpTopics = []helpTopic{ - %[1]struncate %[1]s: ensures input fits within length - %[1]shyperlink %[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 . + To learn more about Go templates, see: . `, "`"), example: heredoc.Doc(`