Replace README with markdown version.

This commit is contained in:
Dmitry Chestnykh 2011-04-16 21:39:53 +02:00
parent e810e021c7
commit 455ea53f19

View File

@ -1,6 +1,6 @@
PACKAGE Package uniuri
=====================
package uniuri
import "github.com/dchest/uniuri" import "github.com/dchest/uniuri"
Package uniuri generates random strings good for use in URIs to identify Package uniuri generates random strings good for use in URIs to identify
@ -20,7 +20,8 @@ Functions read from crypto/rand random source, and panic if they fail to
read from it. read from it.
CONSTANTS Constants
---------
const ( const (
// Standard length of uniuri string to achive ~95 bits of entropy. // Standard length of uniuri string to achive ~95 bits of entropy.
@ -31,26 +32,36 @@ const (
) )
VARIABLES
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890") Variables
---------
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
Standard characters allowed in uniuri string. Standard characters allowed in uniuri string.
FUNCTIONS Functions
---------
### func New
func New() string func New() string
New returns a new random string of the standard length, consisting of New returns a new random string of the standard length, consisting of
standard characters. standard characters.
### func NewLen
func NewLen(length int) string func NewLen(length int) string
NewLen returns a new random string of the provided length, consisting of NewLen returns a new random string of the provided length, consisting of
standard characters. standard characters.
### func NewLenChars
func NewLenChars(length int, chars []byte) string func NewLenChars(length int, chars []byte) string
NewLenChars returns a new random string of the provided length, consisting NewLenChars returns a new random string of the provided length, consisting
of the provided byte slice of allowed characters (maximum 256). of the provided byte slice of allowed characters (maximum 256).