{"id":27062543,"url":"https://github.com/cmackenzie1/go-uuid","last_synced_at":"2026-03-07T18:04:26.757Z","repository":{"id":65451033,"uuid":"592574602","full_name":"cmackenzie1/go-uuid","owner":"cmackenzie1","description":"A simple, stdlib only, go module for generating RFC9562 UUIDs (Universally Unique IDentifiers).","archived":false,"fork":false,"pushed_at":"2025-01-03T19:29:14.000Z","size":23,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T15:17:33.677Z","etag":null,"topics":["cli","rfc4122","rfc9562","uuid","uuidv4","uuidv7"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/cmackenzie1/go-uuid","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/cmackenzie1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-24T02:45:10.000Z","updated_at":"2025-02-27T13:10:29.000Z","dependencies_parsed_at":"2024-11-15T05:15:26.159Z","dependency_job_id":null,"html_url":"https://github.com/cmackenzie1/go-uuid","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"f70e9da5c31497b1f74b5d4275ef4d42a5ceb933"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/cmackenzie1/go-uuid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmackenzie1%2Fgo-uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmackenzie1%2Fgo-uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmackenzie1%2Fgo-uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmackenzie1%2Fgo-uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmackenzie1","download_url":"https://codeload.github.com/cmackenzie1/go-uuid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmackenzie1%2Fgo-uuid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30225461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T17:00:40.062Z","status":"ssl_error","status_checked_at":"2026-03-07T17:00:39.026Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","rfc4122","rfc9562","uuid","uuidv4","uuidv7"],"created_at":"2025-04-05T15:17:39.836Z","updated_at":"2026-03-07T18:04:26.741Z","avatar_url":"https://github.com/cmackenzie1.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-uuid\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/cmackenzie1/go-uuid.svg)](https://pkg.go.dev/github.com/cmackenzie1/go-uuid)\n![go workflow](https://github.com/cmackenzie1/go-uuid/actions/workflows/go.yml/badge.svg)\n\nA simple, stdlib only, go module for generating version 4 (random) and version 7 (time-based) UUIDs (**U**niversally **U**nique **ID**entifiers). This library is based on the [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) specification.\n\n## Installation\n\n### CLI\n\n```bash\n# Using go install\ngo install github.com/cmackenzie1/go-uuid/cmd/uuid@latest\n```\n\nOr download the binary from [Releases](https://github.com/cmackenzie1/go-uuid/releases)\n\n### Package\n\n```bash\ngo get github.com/cmackenzie1/go-uuid\n```\n\n## Supported versions\n\n| Version     | Variant | Details                                                                             |\n| ----------- | ------- | ----------------------------------------------------------------------------------- |\n| `Version 4` | `10`    | Pure random as defined in [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html).   |\n| `Version 7` | `10`    | Time-sortable as defined in [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html). |\n\n## Usage\n\n```go\n// example/example.go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/cmackenzie1/go-uuid\"\n)\n\nfunc main() {\n\tv4, err := uuid.NewV4()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"UUIDv4: %s\\n\", v4) // c07526de-40e5-418f-93d1-73ba20d2ac2c\n\n\tv7, _ := uuid.NewV7()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"UUIDv7: %s\\n\", v7) // 0185e1af-a3c1-704f-80f5-6fd2f8387f09\n}\n\n```\n\n## FAQ\n\n### What are the benefits of this library over X?\n\n- A single library with no external dependencies for multiple types of UUIDs.\n- `UUID` type is defined as a fixed-size, `[16]byte`, array which can be used as a map key (instead of the 36 byte\n  string representation). Over 2x space savings for memory!\n- Limited API. As per RFC9562, UUIDs (while containing embedded information), should be treated as opaque\n  values. There is no temptation to build dependencies on the embedded information if you can't easily access it. 😉\n\n### When should I use UUIDv7 over UUIDv4?\n\n\u003e Non-time-ordered UUID versions such as UUIDv4 have poor database index locality. This means that new\n\u003e values created in succession are not close to each other in the index and thus require inserts to be performed at\n\u003e random locations. The negative performance effects of which on common structures used for this (B-tree and its\n\u003e variants) can be dramatic. [1]\n\n**tl;dr**: if you intend to use the UUID as a database key, use UUIDv7. If you require\npurely random IDs, use UUIDv4.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](./LICENSE.md)\n\n[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-2.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmackenzie1%2Fgo-uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmackenzie1%2Fgo-uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmackenzie1%2Fgo-uuid/lists"}