17 lines
296 B
Go
17 lines
296 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
"profanity"
|
|
)
|
|
|
|
func main() {
|
|
filter := profanity.New()
|
|
filter.MustAddFile(os.Open("./data/wordlist.txt"))
|
|
bad, curse, _ := filter.FilterWord("ꜰuck")
|
|
log.Println(bad, curse)
|
|
bad, curse, _ = filter.FilterWord("not a bad word")
|
|
log.Println(bad, curse)
|
|
}
|