You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
300 B

package main
import "strings"
func removeLinks(text string) string {
words := strings.Split(text, " ")
var cleaned []string
for i := 0; i < len(words); i++ {
if strings.Contains(words[i], "http") {
} else {
cleaned = append(cleaned, words[i])
}
}
return strings.Join(cleaned, " ")
}