{"id":36726622,"url":"https://github.com/nikandfor/goid","last_synced_at":"2026-01-12T12:02:18.781Z","repository":{"id":57539438,"uuid":"288812423","full_name":"nikandfor/goid","owner":"nikandfor","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-09T20:33:33.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-27T22:24:35.208Z","etag":null,"topics":["gls","go","golang","goroutine","id","tls"],"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/nikandfor.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}},"created_at":"2020-08-19T18:52:17.000Z","updated_at":"2021-12-01T09:53:21.000Z","dependencies_parsed_at":"2022-09-26T18:31:46.650Z","dependency_job_id":null,"html_url":"https://github.com/nikandfor/goid","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/nikandfor/goid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fgoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fgoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fgoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fgoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikandfor","download_url":"https://codeload.github.com/nikandfor/goid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikandfor%2Fgoid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["gls","go","golang","goroutine","id","tls"],"created_at":"2026-01-12T12:02:18.696Z","updated_at":"2026-01-12T12:02:18.763Z","avatar_url":"https://github.com/nikandfor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goid\n\nDo not use this package (https://golang.org/doc/faq#no_goroutine_id).\n\nOr use: example [./goid_example_test.go](./goid_example_test.go), doc https://pkg.go.dev/github.com/nikandfor/goid?tab=doc\n\ntl;dr\n```go\nfunc f() {\n    id := goid.ID() // \u003c-- that's why you are here\n\n    s := goid.StartPC() // goroutine main (root) function entry point (\"id := goid.ID()\").\n    g := goid.GoPC() // go statement pc (\"go f()\")\n}\n```\n\n# goroutine local storage\n\nThere is some rarely used field in goroutine struct. So it could be used to save some stuff.\n\n```go\ntype Storage struct {\n    // ... any fields ...\n}\n\nfunc f() {\n    s := (*Storage)(goid.GLoad()) // nil at first\n\n    goid.GSave(unsafe.Pointer(\u0026Storage{ /* ... */}))\n\n    // ... later event in some other function ...\n\n    s1 := (*Storage)(goid.GLoad())\n    // use s1.YourField\n}\n```\n\n# One more time: it's fun, play with it, but try not to use in real code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikandfor%2Fgoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikandfor%2Fgoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikandfor%2Fgoid/lists"}