{"id":16768087,"url":"https://github.com/bouk/gotre","last_synced_at":"2025-03-16T13:22:34.160Z","repository":{"id":27839359,"uuid":"31329425","full_name":"bouk/gotre","owner":"bouk","description":"Go Tail Recursion Eliminator","archived":false,"fork":false,"pushed_at":"2015-02-25T18:36:18.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T01:11:24.316Z","etag":null,"topics":[],"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/bouk.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}},"created_at":"2015-02-25T18:35:25.000Z","updated_at":"2020-02-28T13:32:41.000Z","dependencies_parsed_at":"2022-09-03T18:41:09.006Z","dependency_job_id":null,"html_url":"https://github.com/bouk/gotre","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/bouk%2Fgotre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouk%2Fgotre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouk%2Fgotre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bouk%2Fgotre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bouk","download_url":"https://codeload.github.com/bouk/gotre/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243872781,"owners_count":20361545,"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-13T06:10:43.682Z","updated_at":"2025-03-16T13:22:34.074Z","avatar_url":"https://github.com/bouk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotre: Golang Tail Recursion Eliminator\n\nGotre takes a `.go` files and rewrites any functions that do tail recursion to prevent allocating unneeded stackframes. The go compiler currently doesn't do this automatically.\n\n## Example\n\n```go\n// cat fib.go\npackage fib\n\nfunc fibRecurse(a, b, n int) int {\n  if n \u003c= 0 {\n    return a\n  }\n  return fibRecurse(b, a+b, n-1)\n}\n\nfunc Fib(n int) int {\n  return fibRecurse(0, 1, n)\n}\n\n// ./gotre test/fib.go\npackage fib\n\nfunc fibRecurse(a, b, n int) int {\n__tre__:\n  if n \u003c= 0 {\n    return a\n  }\n  a, b, n = b, a+b, n-1\n  goto __tre__\n}\n\nfunc Fib(n int) int {\n  return fibRecurse(0, 1, n)\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbouk%2Fgotre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbouk%2Fgotre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbouk%2Fgotre/lists"}