github.com/argoproj/argo-cd@v1.8.7/util/text/text.go (about)

     1  package text
     2  
     3  import "strings"
     4  
     5  // truncates messages to n characters
     6  func Trunc(message string, n int) string {
     7  	if len(message) > n {
     8  		return message[0:n-3] + "..."
     9  	}
    10  	return message
    11  }
    12  
    13  func SemVer(s string) string {
    14  	return strings.ReplaceAll(s, "+", "")
    15  }