Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return error on functions NewV{1,2,4} #91

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ var (

// NewV1 returns UUID based on current timestamp and MAC address.
func NewV1() (UUID, error) {
return global.NewV1()
u, err := global.NewV1()
return u, err
}

// NewV2 returns DCE Security UUID based on POSIX UID/GID.
func NewV2(domain byte) (UUID, error) {
return global.NewV2(domain)
u, err := global.NewV2(domain)
return u, err
}

// NewV3 returns UUID based on MD5 hash of namespace UUID and name.
Expand All @@ -66,7 +68,8 @@ func NewV3(ns UUID, name string) UUID {

// NewV4 returns random generated UUID.
func NewV4() (UUID, error) {
return global.NewV4()
u, err := global.NewV4()
return u, err
}

// NewV5 returns UUID based on SHA-1 hash of namespace UUID and name.
Expand Down