An open API service indexing awesome lists of open source software.

https://github.com/karpeleslab/rndstr

Random string functions in Go
https://github.com/karpeleslab/rndstr

Last synced: 12 months ago
JSON representation

Random string functions in Go

Awesome Lists containing this project

README

          

[![GoDoc](https://godoc.org/github.com/KarpelesLab/rndstr?status.svg)](https://godoc.org/github.com/KarpelesLab/rndstr)

# Simple random string generator

This allows generating random strings very easily.

```go
fmt.Printf("Random string: %s\n", rndstr.Simple(16, rndstr.Alnum))

// or to generate a secure string, using crypto/rand
secureStr := rndstr.SimpleReader(16, rndstr.Alnum, rand.Reader)
```