diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-26 11:59:23 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-26 11:59:23 -0600 |
| commit | 1e52b71575b694e370e46c2cc81f322db1b176c2 (patch) | |
| tree | 3641ebe4472e165c2665bf2deb7d8e51ff806eb1 /repeat_test.go | |
| parent | d87ddbb288b7407179285c0f5193b3272027eea6 (diff) | |
Add Example usage of Repeat
Diffstat (limited to 'repeat_test.go')
| -rw-r--r-- | repeat_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/repeat_test.go b/repeat_test.go index ccb8d12..6c179ce 100644 --- a/repeat_test.go +++ b/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 +} |
