github.com/argoproj/argo-cd/v3@v3.2.1/util/notification/expression/strings/strings.go (about)

     1  package strings
     2  
     3  import (
     4  	"strings"
     5  )
     6  
     7  func NewExprs() map[string]any {
     8  	return map[string]any{
     9  		"ReplaceAll": replaceAll,
    10  		"ToUpper":    toUpper,
    11  		"ToLower":    toLower,
    12  	}
    13  }
    14  
    15  func replaceAll(s, old, newV string) string {
    16  	return strings.ReplaceAll(s, old, newV)
    17  }
    18  
    19  func toUpper(s string) string {
    20  	return strings.ToUpper(s)
    21  }
    22  
    23  func toLower(s string) string {
    24  	return strings.ToLower(s)
    25  }