Commit 1e52b71
Changed files (1)
repeat_test.go
@@ -1,5 +1,6 @@
package main
+import "fmt"
import "testing"
func TestRepeat(t *testing.T) {
@@ -27,3 +28,8 @@ func BenchmarkRepeat(b *testing.B) {
Repeat("a", 5)
}
}
+
+func ExampleRepeat() {
+ fmt.Println(Repeat("x", 10))
+ // Output: xxxxxxxxxx
+}