{"id":20298236,"url":"https://github.com/jquiterio/uuid","last_synced_at":"2025-09-01T04:37:31.615Z","repository":{"id":57571859,"uuid":"443545336","full_name":"jquiterio/uuid","owner":"jquiterio","description":"UUID golang","archived":false,"fork":false,"pushed_at":"2023-04-23T10:24:01.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T10:19:29.272Z","etag":null,"topics":["go","uuid","uuid-generator","uuid-parser","uuid-validator"],"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/jquiterio.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-01T13:33:10.000Z","updated_at":"2022-04-30T08:55:50.000Z","dependencies_parsed_at":"2025-01-14T10:15:11.206Z","dependency_job_id":"ea814505-808f-49e7-82b5-4ad25e896246","html_url":"https://github.com/jquiterio/uuid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquiterio%2Fuuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquiterio%2Fuuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquiterio%2Fuuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquiterio%2Fuuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jquiterio","download_url":"https://codeload.github.com/jquiterio/uuid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241794138,"owners_count":20021192,"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":["go","uuid","uuid-generator","uuid-parser","uuid-validator"],"created_at":"2024-11-14T16:07:36.556Z","updated_at":"2025-03-04T06:12:15.350Z","avatar_url":"https://github.com/jquiterio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UUID - RFC4122\n\n\u003cp align=\"center\"\u003e\n    \u003cp\u003e\n      \u003ca href=\"https://github.com/jquiterio/uuid/actions/workflows/ci.yml?query=branch%3Amain\"\u003e\n        \u003cimg src=\"https://github.com/jquiterio/uuid/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\"\u003e\n      \u003c/a\u003e\n      \u003ca href=\"https://codecov.io/gh/jquiterio/uuid/branch/main\"\u003e\n        \u003cimg src=\"https://codecov.io/gh/jquiterio/uuid/branch/main/graph/badge.svg\" alt=\"Code Coverage\"\u003e\n      \u003c/a\u003e \n      \u003ca href=\"https://goreportcard.com/report/jquiterio/uuid\"\u003e\n        \u003cimg src=\"https://goreportcard.com/badge/jquiterio/uuid\" alt=\"Go Report Card\"\u003e\n      \u003c/a\u003e\n      \u003ca href=\"https://github.com/jquiterio/uuid/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/version-2.7.0-blue.svg\" alt=\"Release Version\"\u003e\n      \u003c/a\u003e \n      \u003ca href=\"https://pkg.go.dev/github.com/jquiterio/uuid\"\u003e\n        \u003cimg src=\"https://pkg.go.dev/badge/github.com/jquiterio/uuid\" alt=\"GoDoc\"\u003e\n      \u003c/a\u003e \n      \u003ca href=\"LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/jquiterio/uuid.svg\" alt=\"License\"\u003e\n      \u003c/a\u003e \n    \u003c/p\u003e\n\u003c/p\u003e\n\n---\n\nAnother UUID generator and parser for Go.\nReturns UUID or Nil\n\n## Usage\n\n`go get -u github.com/jquiterio/uuid`\n\n```go\nfunc main(){\n\n  // new V4\n  u := uuid.New() // or u := uuid.NewV4() generates a new UUID v4.\n  u.String() // returns a string uuid\n  u.Bytes() // retruns a byte slice\n\n  u5 := uuid.NewV5() // generates a new UUID v5\n  u5.String()\n  u5.Bytes() // retruns a byte slice\n\n  // Parse UUID\n  // Get UUID from String\n  ufs := uuid.Parse(\"c5302009-7ff6-47d2-9a1c-72601da3e3e5\")\n  ufs.String()\n  // Get UUID from Bytes\n  ufb := Parse(uuid.New().Bytes())\n\n  // IsValid: Check if UUID is Valid\n  uuid.IsValid(\"something\") // may return false\n  uuid.IsValid(\"c5302009-7ff6-47d2-9a1c-72601da3e3e5\") // take ufmay return true\n}\n```\n\nGo struct with GORM\n\n```go\ntype User struct {\n  UUID uuid.UUID `gorm:\"type:uuid\" json:\"uuid\"`\n  Name string `json:\"name\"`\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjquiterio%2Fuuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjquiterio%2Fuuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjquiterio%2Fuuid/lists"}