{"id":16933646,"url":"https://github.com/yah01/future","last_synced_at":"2025-03-21T03:43:43.848Z","repository":{"id":105206724,"uuid":"471264925","full_name":"yah01/future","owner":"yah01","description":"async-await style \u0026 future type for golang","archived":false,"fork":false,"pushed_at":"2022-04-22T20:19:02.000Z","size":6,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T00:26:03.765Z","etag":null,"topics":["async","await","future","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yah01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-18T06:53:00.000Z","updated_at":"2022-03-18T15:49:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"7eb8ab51-df29-49a3-8375-3ec9f2a62650","html_url":"https://github.com/yah01/future","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/yah01%2Ffuture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yah01%2Ffuture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yah01%2Ffuture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yah01%2Ffuture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yah01","download_url":"https://codeload.github.com/yah01/future/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244734095,"owners_count":20501014,"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":["async","await","future","golang"],"created_at":"2024-10-13T20:49:59.560Z","updated_at":"2025-03-21T03:43:43.811Z","avatar_url":"https://github.com/yah01.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Future\n\nAsync-Await style for Golang\n\n## Get Started\ncall a function async:\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t. \"github.com/yah01/future\"\n)\n\nfunc DelayJoin(names ...string) string {\n\ttime.Sleep(time.Second)\n\tresult := strings.Join(names, \", \")\n\n\treturn result\n}\n\nfunc main() {\n\tfuture := Submit(func() (string, error) {\n\t\tres := DelayJoin(\"yah01\", \"zer0ne\")\n\t\treturn res, nil\n\t})\n\n\tfmt.Printf(\"hello %s\", future.Value())\n}\n```\n\nAn async call returns a future, which contains the return value of the method. Invoking `Await()` method to wait for the result.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyah01%2Ffuture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyah01%2Ffuture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyah01%2Ffuture/lists"}