From d5546d994104aa21fc807e97dd9a35fe1a4f1d74 Mon Sep 17 00:00:00 2001 From: Finn Bear Date: Tue, 23 Mar 2021 16:27:33 -0700 Subject: [PATCH] Fix example names in docs. --- moderation_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/moderation_test.go b/moderation_test.go index 66fc540..215dd74 100644 --- a/moderation_test.go +++ b/moderation_test.go @@ -90,7 +90,12 @@ 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: @@ -98,16 +103,11 @@ func ExampleIs_types() { // 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))