Documentation ¶
Index ¶
Constants ¶
View Source
const ( RegexNameGroup = "NAME" RegexNamespaceGroup = "NAMESPACE" )
Variables ¶
This section is empty.
Functions ¶
func IndexBasedReplace ¶
func IndexBasedReplace(input string, items []IndexBasedReplaceItem) string
IndexBasedReplace replaces multiple substrings in the input string with the replacement values based on the indexes in the original input string. input - string that will have parts of it replaced items - slice of IndexBasedRelaceItem(s). Only nonoverlaping index pairs are supported.
func ProcessRegex ¶
func ProcessRegex(regex *regexp.Regexp, input string, translateFunc RegexTranslateFunc) string
Types ¶
type IndexBasedReplaceItem ¶
type RegexTranslateFunc ¶
type RegexTranslateFunc func(name, namespace string) types.NamespacedName
Click to show internal directories.
Click to hide internal directories.