{"id":18334581,"url":"https://github.com/hankjacobs/gointerfacegen","last_synced_at":"2025-07-25T17:34:21.241Z","repository":{"id":145368285,"uuid":"115978731","full_name":"hankjacobs/gointerfacegen","owner":"hankjacobs","description":"Go tool for generating interfaces from a type","archived":false,"fork":false,"pushed_at":"2018-01-02T06:08:26.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T11:32:41.263Z","etag":null,"topics":["go","golang","interface","tool"],"latest_commit_sha":null,"homepage":null,"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/hankjacobs.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":"2018-01-02T05:38:43.000Z","updated_at":"2022-01-01T08:51:55.000Z","dependencies_parsed_at":"2023-06-05T08:30:47.798Z","dependency_job_id":null,"html_url":"https://github.com/hankjacobs/gointerfacegen","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/hankjacobs%2Fgointerfacegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankjacobs%2Fgointerfacegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankjacobs%2Fgointerfacegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankjacobs%2Fgointerfacegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hankjacobs","download_url":"https://codeload.github.com/hankjacobs/gointerfacegen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248093749,"owners_count":21046739,"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":["go","golang","interface","tool"],"created_at":"2024-11-05T19:49:48.576Z","updated_at":"2025-04-09T18:53:54.757Z","avatar_url":"https://github.com/hankjacobs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gointerfacegen\n\nA Go tool used to generate an interface from a type's methods.\n\n## Installation\n\n```bash\ngo get github.com/hankjacobs/gointerfacegen\n```\n\n## Usage\n\n```text\ngointefacegen \u003ctype\u003e \u003cinterface\u003e \u003cfile\u003e\n\nGenerates an interface from the type's methods found in the specified file. File must be valid go source. \nIf the interface already exists, it is updated in place.\nDefault behavior prints the resulting file with the new or updated interface to standard out. \n\nExamples:\ngointefacegen somecustomtype somecustominterface src.go\n\n  -i    Print only interface to standard out. This takes precedence over -w flag\n  -w    Write result to file instead of stdout\n```\n\n## Example\n\nGiven a file `demo.go`:\n\n```go\npackage demo\n\ntype example struct {\n}\n\nfunc (t example) First() {\n}\n\nfunc (t example) Second(one, two string) (named example, other example) {\n    return\n}\n\n```\n\nrunning:\n\n```shell\ngointerfacegen example ExampleInterface demo.go\n```\n\nwill produce:\n\n```go\npackage demo\n\ntype ExampleInterface interface {\n    First()\n    Second(one, two string) (example, example)\n}\n\ntype example struct {\n}\n\nfunc (t example) First() {\n}\n\nfunc (t example) Second(one, two string) (named example, other example) {\n    return\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhankjacobs%2Fgointerfacegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhankjacobs%2Fgointerfacegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhankjacobs%2Fgointerfacegen/lists"}