{"id":13694093,"url":"https://github.com/gofrs/uuid","last_synced_at":"2025-05-14T07:04:43.349Z","repository":{"id":41124729,"uuid":"140785428","full_name":"gofrs/uuid","owner":"gofrs","description":"A UUID package for Go","archived":false,"fork":false,"pushed_at":"2025-05-05T15:54:57.000Z","size":376,"stargazers_count":1636,"open_issues_count":3,"forks_count":116,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-07T06:17:36.323Z","etag":null,"topics":["forked-repo","go","uuid","uuid-generator","uuid1","uuid3","uuid4","uuid5","uuid6","uuid7"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gofrs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-13T02:13:28.000Z","updated_at":"2025-05-05T15:54:59.000Z","dependencies_parsed_at":"2022-07-14T08:31:22.706Z","dependency_job_id":"22722ea9-0a2d-4f53-b2bb-105913fb4072","html_url":"https://github.com/gofrs/uuid","commit_stats":{"total_commits":262,"total_committers":50,"mean_commits":5.24,"dds":0.6259541984732824,"last_synced_commit":"3e3ac898c2a6778e02fa4939ef533cbb3dab71d4"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fuuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fuuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fuuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gofrs%2Fuuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gofrs","download_url":"https://codeload.github.com/gofrs/uuid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036843,"owners_count":22003654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forked-repo","go","uuid","uuid-generator","uuid1","uuid3","uuid4","uuid5","uuid6","uuid7"],"created_at":"2024-08-02T17:01:24.086Z","updated_at":"2025-05-14T07:04:43.276Z","avatar_url":"https://github.com/gofrs.png","language":"Go","funding_links":[],"categories":["开源类库","UUID","Go","Open source library","Utility","Miscellaneous","其他","UUID`UUID 生成和操作库`"],"sub_categories":["UUID","Utility/Miscellaneous","Fail injection","实用程序/Miscellaneous","HTTP Clients","交流","查询语","Advanced Console UIs"],"readme":"# UUID\n\n[![License](https://img.shields.io/github/license/gofrs/uuid.svg)](https://github.com/gofrs/uuid/blob/master/LICENSE)\n[![Build Status](https://github.com/gofrs/uuid/actions/workflows/go.yml/badge.svg)](https://github.com/gofrs/uuid/actions/workflows/go.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/gofrs/uuid/v5.svg)](https://pkg.go.dev/github.com/gofrs/uuid/v5)\n[![Coverage Status](https://codecov.io/gh/gofrs/uuid/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/gh/gofrs/uuid/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gofrs/uuid)](https://goreportcard.com/report/github.com/gofrs/uuid)\n[![CodeQL](https://github.com/gofrs/uuid/actions/workflows/codeql.yml/badge.svg)](https://github.com/gofrs/uuid/actions/workflows/codeql.yml)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8929/badge)](https://www.bestpractices.dev/projects/8929)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/gofrs/uuid/badge)](https://scorecard.dev/viewer/?uri=github.com/gofrs/uuid)\n\nPackage uuid provides a pure Go implementation of Universally Unique Identifiers\n(UUID) variant as defined in RFC-9562. This package supports both the creation\nand parsing of UUIDs in different formats.\n\nThis package supports the following UUID versions:\n\n* Version 1, based on timestamp and MAC address\n* Version 3, based on MD5 hashing of a named value\n* Version 4, based on random numbers\n* Version 5, based on SHA-1 hashing of a named value\n* Version 6, a k-sortable id based on timestamp, and field-compatible with v1\n* Version 7, a k-sortable id based on timestamp\n\n## Project History\n\nThis project was originally forked from the\n[github.com/satori/go.uuid](https://github.com/satori/go.uuid) repository after\nit appeared to be no longer maintained, while exhibiting [critical\nflaws](https://github.com/satori/go.uuid/issues/73). We have decided to take\nover this project to ensure it receives regular maintenance for the benefit of\nthe larger Go community.\n\nWe'd like to thank Maxim Bublis for his hard work on the original iteration of\nthe package.\n\n## License\n\nThis source code of this package is released under the MIT License. Please see\nthe [LICENSE](https://github.com/gofrs/uuid/blob/master/LICENSE) for the full\ncontent of the license.\n\n## Recommended Package Version\n\nWe recommend using v2.0.0+ of this package, as versions prior to 2.0.0 were\ncreated before our fork of the original package and have some known\ndeficiencies.\n\n## Requirements\n\nThis package requires Go 1.19 or later\n\n## Usage\n\nHere is a quick overview of how to use this package. For more detailed\ndocumentation, please see the [GoDoc Page](http://godoc.org/github.com/gofrs/uuid).\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/gofrs/uuid/v5\"\n)\n\n// Create a Version 4 UUID, panicking on error.\n// Use this form to initialize package-level variables.\nvar u1 = uuid.Must(uuid.NewV4())\n\nfunc main() {\n\t// Create a Version 4 UUID.\n\tu2, err := uuid.NewV4()\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to generate UUID: %v\", err)\n\t}\n\tlog.Printf(\"generated Version 4 UUID %v\", u2)\n\n\t// Parse a UUID from a string.\n\ts := \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"\n\tu3, err := uuid.FromString(s)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed to parse UUID %q: %v\", s, err)\n\t}\n\tlog.Printf(\"successfully parsed UUID %v\", u3)\n}\n```\n\n## References\n\n* [RFC-9562](https://tools.ietf.org/html/rfc9562) (replaces RFC-4122)\n* [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofrs%2Fuuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgofrs%2Fuuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofrs%2Fuuid/lists"}