arnaucube
arnaucube/twitterReaderPublic Self-hosted repository
twitterReader/utils.go
utils.goRaw
 1package main
 2
 3import "strings"
 4
 5func removeLinks(text string) string {
 6	words := strings.Split(text, " ")
 7	var cleaned []string
 8	for i := 0; i < len(words); i++ {
 9		if strings.Contains(words[i], "http") {
10
11		} else {
12			cleaned = append(cleaned, words[i])
13		}
14	}
15	return strings.Join(cleaned, " ")
16}