mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-30 13:28:46 +02:00
16 lines
262 B
Go
16 lines
262 B
Go
package text
|
|
|
|
import "strings"
|
|
|
|
// truncates messages to n characters
|
|
func Trunc(message string, n int) string {
|
|
if len(message) > n {
|
|
return message[0:n-3] + "..."
|
|
}
|
|
return message
|
|
}
|
|
|
|
func SemVer(s string) string {
|
|
return strings.ReplaceAll(s, "+", "")
|
|
}
|