{"id":16484749,"url":"https://github.com/damdo/randid","last_synced_at":"2025-02-28T22:24:24.289Z","repository":{"id":96653190,"uuid":"129406943","full_name":"damdo/randid","owner":"damdo","description":":1234::abcd: crypto-secure random ids generation lib for Go","archived":false,"fork":false,"pushed_at":"2022-02-05T21:09:29.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T14:30:39.429Z","etag":null,"topics":["go","golang","ids","random","uid"],"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/damdo.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":"2018-04-13T13:36:03.000Z","updated_at":"2022-02-05T20:29:31.000Z","dependencies_parsed_at":"2023-05-06T12:15:49.973Z","dependency_job_id":null,"html_url":"https://github.com/damdo/randid","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Frandid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Frandid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Frandid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damdo%2Frandid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damdo","download_url":"https://codeload.github.com/damdo/randid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241255632,"owners_count":19934894,"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","golang","ids","random","uid"],"created_at":"2024-10-11T13:18:09.254Z","updated_at":"2025-02-28T22:24:24.248Z","avatar_url":"https://github.com/damdo.png","language":"Go","readme":"## randid\n[![GoDoc](http://godoc.org/github.com/damdo/randid?status.svg)](http://godoc.org/github.com/damdo/randid) \n[![Build Status](https://travis-ci.org/damdo/randid.svg?branch=master)](https://travis-ci.org/damdo/randid)\n[![Coverage Status](https://coveralls.io/repos/github/damdo/randid/badge.svg?branch=master)](https://coveralls.io/github/damdo/randid?branch=master)\n\n**generate** (crypto-secure) **random** (alphanumeric string) **ids** - in Go\n\n\n### FEATURES:\n- **secure** :lock: crypto random ids thanks to `crypto/rand`\n- **fast** :zap:\n- both fixed and arbitrary long generation methods\n- **tested** :white_check_mark:\n- **dependency-less**\n\n\n### USAGE:\ndownload the package\n```sh\ngo get github.com/damdo/randid\n```\n\nimport and use the package\n```go\nimport (\n  \"fmt\"\n  \"github.com/damdo/randid\"\n)\n\nfunc foo(){\n\n    // generate a default len (32 char) id\n    your32CharLongID, err := randid.ID()\n    // -\u003e 26e99c11f0a31ec57924c8e2a0712cd3\n    if err != nil {\n      fmt.Println(err)\n    }\n\n    // or\n    desiredLen := 64\n    your64CharLongID, err := randid.SizedID(desiredLen)\n    // -\u003e 6cc77090ff64c232613574bb562510f78d88a84e8351f3a68ac1caa902750bb7\n    if err != nil {\n      fmt.Println(err)\n    }\n\n    // change randid default len\n    // every id generated from now on with .ID() will be 33 char long\n    randid.DefaultLen = 33\n\n    your33CharLongID, err := randid.ID()\n    // -\u003e 091015d5146b6d2e3f77ff50d805cee50\n    if err != nil {\n      fmt.Println(err)\n    }\n\n}\n```\n### CREDITS:\nCredits goes to https://github.com/moby/moby/blob/master/pkg/stringid \u003cbr\u003e\nupon which this mini package is heavily based.\n\n### LICENSE:\nThe MIT License (MIT) - see [`LICENSE.md`](https://github.com/damdo/randid/blob/master/LICENSE) for more details\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamdo%2Frandid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamdo%2Frandid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamdo%2Frandid/lists"}