{"id":16641855,"url":"https://github.com/samthor/inc","last_synced_at":"2026-04-25T01:37:05.678Z","repository":{"id":66115181,"uuid":"51672079","full_name":"samthor/inc","owner":"samthor","description":"tiny golang version helper","archived":false,"fork":false,"pushed_at":"2016-10-18T12:48:11.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T15:52:53.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.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":"2016-02-14T00:12:21.000Z","updated_at":"2016-02-14T00:13:11.000Z","dependencies_parsed_at":"2023-02-20T19:30:58.688Z","dependency_job_id":null,"html_url":"https://github.com/samthor/inc","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/samthor%2Finc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Finc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Finc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Finc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/inc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243164986,"owners_count":20246718,"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":[],"created_at":"2024-10-12T07:48:06.028Z","updated_at":"2025-12-27T04:05:19.097Z","avatar_url":"https://github.com/samthor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Provides `Inc`, a helper for concurrent Go applications.\n\nEach instance encapsulates an always-increasing `time.Time` as a monotonically increasing version number.\nClients can wait for the version to change.\n\nGood usages for this object are to guard some external state, e.g., the current state of physical sensors where history is not important.\n\n## Usage\n\nBasic, direct usage.\n\n```go\ni := inc.New()\n\n// on one goroutine\nvar ver time.Time\nver = i.Wait(ver, nil)\n\n// on another goroutine\ni.Update()\n```\n\nUse with channels.\n\n```go\nupdate, cancel := i.Pend(ver)\nver = \u003c-update // read next version\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Finc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Finc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Finc/lists"}