package service import ( "strings" "unicode" ) func IsNumeric(str string) bool { for _, char := range str { if !unicode.IsDigit(char) { return false } } return true } func MakeSlug(s string) string { // Convert to lowercase s = strings.ToLower(s) // Replace spaces with hyphens s = strings.ReplaceAll(s, " ", "-") // Remove non-alphanumeric characters return strings.Map(func(r rune) rune { if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '-' { return r } return -1 }, s) }