All Projects → gofrs → Uuid

gofrs / Uuid

Licence: mit
A UUID package originally forked from github.com/satori/go.uuid

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Uuid

uuix
A tiny (<1KB) and fast UUID (v4) generator for Crystal
Stars: ✭ 17 (-98.09%)
Mutual labels:  uuid
Android cn oaid
适用于国内各大Android手机厂商的开放匿名设备标识(OAID)解决方案,可替代移动安全联盟提供的 SDK 闭源方案(miit_mdid_xxx.aar)。
Stars: ✭ 370 (-58.33%)
Mutual labels:  uuid
Shortuuid
🍄 A generator library for concise, unambiguous and URL-safe UUIDs
Stars: ✭ 603 (-32.09%)
Mutual labels:  uuid
twitch-chat-visualizer
A Node.js Project. Would you like to see your chat stream with a custom design? This is for you!
Stars: ✭ 14 (-98.42%)
Mutual labels:  uuid
Xyuuid
iOS14 UUID KeyChain DeviceInfo IDFA UDID
Stars: ✭ 301 (-66.1%)
Mutual labels:  uuid
Laravel Eloquent Uuid
A simple drop-in solution for providing UUID support for the IDs of your Eloquent models.
Stars: ✭ 388 (-56.31%)
Mutual labels:  uuid
secrets.clj
A library designed to generate cryptographically strong random numbers.
Stars: ✭ 64 (-92.79%)
Mutual labels:  uuid
Uuid Doctrine
Allow the use of a ramsey/uuid UUID as Doctrine field type.
Stars: ✭ 751 (-15.43%)
Mutual labels:  uuid
Uniuri
Go package uniuri generates random strings good for use in URIs to identify unique objects.
Stars: ✭ 336 (-62.16%)
Mutual labels:  uuid
Laravel Binary Uuid
Optimised binary UUIDs in Laravel
Stars: ✭ 523 (-41.1%)
Mutual labels:  uuid
cyksuid
Fast Python implementation of KSUID (K-Sortable Globally Unique IDs) using Cython
Stars: ✭ 29 (-96.73%)
Mutual labels:  uuid
Newid
A sequential id generator that works across nodes with no collisions
Stars: ✭ 255 (-71.28%)
Mutual labels:  uuid
Go.uuid
UUID package for Go
Stars: ✭ 4,427 (+398.54%)
Mutual labels:  uuid
vue-uuid
Add UUID to Vue instance.
Stars: ✭ 55 (-93.81%)
Mutual labels:  uuid
Uuid Readable
Generate Easy to Remember, Readable UUIDs, that are Shakespearean and Grammatically Correct Sentences 🥳
Stars: ✭ 616 (-30.63%)
Mutual labels:  uuid
ulid-creator
A Java library for generating Universally Unique Lexicographically Sortable Identifiers (ULID)
Stars: ✭ 38 (-95.72%)
Mutual labels:  uuid
Go Nanoid
Golang random IDs generator.
Stars: ✭ 373 (-58%)
Mutual labels:  uuid
Ordered Uuid
Reorganizes UUIDs for the purpose of fast indexing and searching by a database.
Stars: ✭ 5 (-99.44%)
Mutual labels:  uuid
Timeflake
Timeflake is a 128-bit, roughly-ordered, URL-safe UUID.
Stars: ✭ 669 (-24.66%)
Mutual labels:  uuid
Uuid
Generate and parse UUIDs.
Stars: ✭ 457 (-48.54%)
Mutual labels:  uuid

UUID

License Build Status GoDoc Coverage Status Go Report Card

Package uuid provides a pure Go implementation of Universally Unique Identifiers (UUID) variant as defined in RFC-4122. This package supports both the creation and parsing of UUIDs in different formats.

This package supports the following UUID versions:

  • Version 1, based on timestamp and MAC address (RFC-4122)
  • Version 3, based on MD5 hashing of a named value (RFC-4122)
  • Version 4, based on random numbers (RFC-4122)
  • Version 5, based on SHA-1 hashing of a named value (RFC-4122)

Project History

This project was originally forked from the github.com/satori/go.uuid repository after it appeared to be no longer maintained, while exhibiting critical flaws. We have decided to take over this project to ensure it receives regular maintenance for the benefit of the larger Go community.

We'd like to thank Maxim Bublis for his hard work on the original iteration of the package.

License

This source code of this package is released under the MIT License. Please see the LICENSE for the full content of the license.

Recommended Package Version

We recommend using v2.0.0+ of this package, as versions prior to 2.0.0 were created before our fork of the original package and have some known deficiencies.

Installation

It is recommended to use a package manager like dep that understands tagged releases of a package, as well as semantic versioning.

If you are unable to make use of a dependency manager with your project, you can use the go get command to download it directly:

$ go get github.com/gofrs/uuid

Requirements

Due to subtests not being supported in older versions of Go, this package is only regularly tested against Go 1.7+. This package may work perfectly fine with Go 1.2+, but support for these older versions is not actively maintained.

Go 1.11 Modules

As of v3.2.0, this repository no longer adopts Go modules, and v3.2.0 no longer has a go.mod file. As a result, v3.2.0 also drops support for the github.com/gofrs/uuid/v3 import path. Only module-based consumers are impacted. With the v3.2.0 release, all gofrs/uuid consumers should use the github.com/gofrs/uuid import path.

An existing module-based consumer will continue to be able to build using the github.com/gofrs/uuid/v3 import path using any valid consumer go.mod that worked prior to the publishing of v3.2.0, but any module-based consumer should start using the github.com/gofrs/uuid import path when possible and must use the github.com/gofrs/uuid import path prior to upgrading to v3.2.0.

Please refer to Issue #61 and Issue #66 for more details.

Usage

Here is a quick overview of how to use this package. For more detailed documentation, please see the GoDoc Page.

package main

import (
	"log"

	"github.com/gofrs/uuid"
)

// Create a Version 4 UUID, panicking on error.
// Use this form to initialize package-level variables.
var u1 = uuid.Must(uuid.NewV4())

func main() {
	// Create a Version 4 UUID.
	u2, err := uuid.NewV4()
	if err != nil {
		log.Fatalf("failed to generate UUID: %v", err)
	}
	log.Printf("generated Version 4 UUID %v", u2)

	// Parse a UUID from a string.
	s := "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
	u3, err := uuid.FromString(s)
	if err != nil {
		log.Fatalf("failed to parse UUID %q: %v", s, err)
	}
	log.Printf("successfully parsed UUID %v", u3)
}

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].