Commit 1e52b71

mo khan <mo.khan@gmail.com>
2019-10-26 17:59:23
Add Example usage of Repeat
1 parent d87ddbb
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
+}