package utils func Substring(s string, length int) string { runes := []rune(s) if len(runes) <= length { return s } return string(runes[:length]) }