Skip to content

eyediy/uuid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

package uuid provides an RFC 4122 UUID generator.

Each supported UUID version provides two functions: GenerateVn, where n is the version number, and GenerateVnString. The GenerateVn function returns the UUID as a Uuid type (currently implemented as a []byte), and the GenerateVnString returns the UUID as a string.

Tests for each exported function are also provided, which include checks to ensure that generated UUIDs are in the proper format.

FUNCTIONS

// GenerateV4String returns a version 4 UUID as a string.
func GenerateV4String() (u string, err error)
// GenerateV4 returns a version 4 UUID as a byte slice.
func GenerateV4() (u Uuid, err error)

TYPES

type Uuid []byte

About

RFC 4122 UUID generator in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%