Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Fix example names in docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Mar 23, 2021
1 parent f717188 commit d5546d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions moderation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,24 @@ func TestRedundantReplacement(t *testing.T) {
}
}

func ExampleIs_types() {
func ExampleIsInappropriate() {
fmt.Println(IsInappropriate("hello"), IsInappropriate("sh1t"))
// Output: false true
}

func ExampleType_Is_types() {
fmt.Println(Scan("shit").Is(Profane), Scan("shit").Is(Sexual|Mean))
fmt.Println(Scan("HELLO THERE").Is(Spam), Scan("duuuuuuuuumb").Is(Spam), Scan("Normal text").Is(Spam))
// Output:
// true false
// true true false
}

func ExampleIs_severity() {
func ExampleType_Is_severity() {
fmt.Println(Scan("sh1t").Is(Profane), Scan("sh1t").Is(Profane&Severe))
// Output: true false
}

func ExampleIsInappropriate() {
fmt.Println(IsInappropriate("hello"), IsInappropriate("sh1t"))
// Output: false true
}

func ExampleScan() {
result := Scan("you're a dumbass")
fmt.Println(result.Is(Profane), result.Is(Offensive), result.Is(Sexual), result.Is(Mean), result.Is(Mean&Severe))
Expand Down

0 comments on commit d5546d9

Please sign in to comment.