diff --git a/src/strings/example_test.go b/src/strings/example_test.go index 103ef51f29e..85b182adcc8 100644 --- a/src/strings/example_test.go +++ b/src/strings/example_test.go @@ -199,9 +199,13 @@ func ExampleRepeat() { func ExampleReplace() { fmt.Println(strings.Replace("oink oink oink", "k", "ky", 2)) - fmt.Println(strings.ReplaceAll("oink oink oink", "oink", "moo")) // Output: // oinky oinky oink +} + +func ExampleReplaceAll() { + fmt.Println(strings.ReplaceAll("oink oink oink", "oink", "moo")) + // Output: // moo moo moo }