porting all github actions from bluesky-social/indigo to tangled CI
at main 364 B view raw
1package keyword 2 3import ( 4 "regexp" 5 "strings" 6) 7 8var nonSlugChars = regexp.MustCompile(`[^\pL\pN]+`) 9 10// Takes an arbitrary string (eg, an identifier or free-form text) and returns a version with all non-letter, non-digit characters removed, and all lower-case 11func Slugify(orig string) string { 12 return strings.ToLower(nonSlugChars.ReplaceAllString(orig, "")) 13}