{"id":16905251,"url":"https://github.com/tobyxdd/ginline","last_synced_at":"2025-03-20T16:20:15.214Z","repository":{"id":84165063,"uuid":"326521227","full_name":"tobyxdd/ginline","owner":"tobyxdd","description":"Go AST inliner","archived":false,"fork":false,"pushed_at":"2021-01-04T00:38:41.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T15:12:29.062Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobyxdd.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":"2021-01-03T23:29:30.000Z","updated_at":"2021-03-12T05:40:33.000Z","dependencies_parsed_at":"2023-03-12T21:54:10.690Z","dependency_job_id":null,"html_url":"https://github.com/tobyxdd/ginline","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/tobyxdd%2Fginline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyxdd%2Fginline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyxdd%2Fginline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobyxdd%2Fginline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobyxdd","download_url":"https://codeload.github.com/tobyxdd/ginline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244647095,"owners_count":20487010,"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-13T18:37:54.055Z","updated_at":"2025-03-20T16:20:15.189Z","avatar_url":"https://github.com/tobyxdd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ginline\n\nGo AST inliner\n\n## Example\n\n### Source\n\n```go\npackage main\n\nimport \"fmt\"\n\n// [always_inline]\nfunc calcs(a, b int) (int, int, int) {\n\treturn a + b, a - b, a * b\n}\n\nfunc main() {\n\ta, b, c := calcs(7, 9)\n\tfmt.Println(a, b, c)\n}\n```\n\n### Generated\n\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tvar (\n\t\ta int\n\t\tb int\n\t\tc int\n\t)\n\t{\n\t\tvar (\n\t\t\t_rv_0 int\n\t\t\t_rv_1 int\n\t\t\t_rv_2 int\n\t\t)\n\t\t{\n\t\t\tvar (\n\t\t\t\ta int = 7\n\t\t\t\tb int = 9\n\t\t\t)\n\t\t\t{\n\t\t\t\t_rv_0 = a + b\n\t\t\t\t_rv_1 = a - b\n\t\t\t\t_rv_2 = a * b\n\t\t\t}\n\t\t}\n\t\ta, b, c = _rv_0, _rv_1, _rv_2\n\t}\n\tfmt.Println(a, b, c)\n}\n\n```\n\n## Limitations\n\n- Only supports calls without using return values (`foo()`) and simple assignments (`a, b, c := foo()`). The cases where it appears in expressions (`bar(foo()+1)`) are not supported for now **(WIP)**\n- Methods (`func (b Bar) Foo()`) are not supported for now **(WIP)**\n- Can't handle `defer` correctly (Unsure about the solution. Suggestions are welcome)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobyxdd%2Fginline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobyxdd%2Fginline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobyxdd%2Fginline/lists"}