Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ErfanMomeniii authored and thanhpk committed Oct 18, 2022
1 parent d192e61 commit 334b24f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,31 @@ Running example
// kDX1m81u14YwEiCY
```

### Generate a random number string
```go
token := randstr.String(16) // generate a random 16 length string of number
```
Running example
```go
package main
import(
"github.com/thanhpk/randstr"
"fmt"
)

func main() {
for i := 0; i < 5; i++ {
token := randstr.Number(16)
fmt.Println(token)
}
}
// Output:
//1232392418047380
//9160917876815937
//6629264107419930
//0271037110897873
//0337735480322223
```

## License [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
MIT

0 comments on commit 334b24f

Please sign in to comment.