{"id":30248290,"url":"https://github.com/wizacklabs/protoc-gen-ego","last_synced_at":"2025-08-15T07:39:00.618Z","repository":{"id":256023223,"uuid":"853613867","full_name":"wizacklabs/protoc-gen-ego","owner":"wizacklabs","description":"An extended go protobuffers generating plugin, which can customize message field name, struct tags, and CamelCase formatted enum constant name.","archived":false,"fork":false,"pushed_at":"2025-08-14T03:59:23.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T05:32:10.987Z","etag":null,"topics":["gorm","json","protobuf","protoc-gen-go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wizacklabs.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,"zenodo":null}},"created_at":"2024-09-07T03:26:12.000Z","updated_at":"2025-08-14T03:59:27.000Z","dependencies_parsed_at":"2024-09-08T15:34:06.815Z","dependency_job_id":"f8cef5f4-4339-40d9-92aa-ea799bacb414","html_url":"https://github.com/wizacklabs/protoc-gen-ego","commit_stats":null,"previous_names":["derekhjray/protoc-gen-go","wizacklabs/protoc-gen-ego"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/wizacklabs/protoc-gen-ego","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizacklabs%2Fprotoc-gen-ego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizacklabs%2Fprotoc-gen-ego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizacklabs%2Fprotoc-gen-ego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizacklabs%2Fprotoc-gen-ego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wizacklabs","download_url":"https://codeload.github.com/wizacklabs/protoc-gen-ego/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wizacklabs%2Fprotoc-gen-ego/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270539592,"owners_count":24603191,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gorm","json","protobuf","protoc-gen-go"],"created_at":"2025-08-15T07:38:57.240Z","updated_at":"2025-08-15T07:39:00.604Z","avatar_url":"https://github.com/wizacklabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# protc-gen-ego\n\nThe protoc-gen-ego project is another protoc plugin to generate Go code for both proto2 and proto3 versions of the protocol buffer language. \n\nThe protoc-gen-ego works just like official plugin, and provides some new features to auto generate message field tag and customized field name from comments, and CamelCase formatted enum constants name \n\nFor more information about the usage of this plugin, see: https://protobuf.dev/reference/go/go-generated.\n\n## Features\n- auto generate message field tags from comments\n- customize message field name\n- generate CamelCase formatted enum constants name\n\n## Limitations\n- only works for message field declaration\n\n## Installation\n```bash\ngo install github.com/wizacklabs/proto-gen-ego\n```\n\n## Usage\n### General Command Line Arguments\n```bash\nprotoc --plugin=protoc-gen-ego --ego_out=. --ego_opt=paths=source_relative xxx/xxx.proto\n```\n\n### Generate CamelCase Enum Constants\n- protobuf source code\n```protobuf\nenum Role {\n  UNSPECIFIC      = 0;\n  CREATOR         = 1;\n  OWNER           = 2;\n  FINANCE_MANAGER = 3;\n}\n```\n- generate option\n```bash\nprotoc --plugin=protoc-gen-ego --ego_out=enum=camelcase:. --ego_opt=paths=source_relative xxx/xxx.proto\n```\n\n- generated go source code\n```go\ntype Role int32\n\nconst (\n\tRoleUnspecific     Role = 0\n\tRoleCreator        Role = 1\n\tRoleOwner          Role = 2\n\tRoleFinanceManager Role = 3\n)\n```\n\n### Generate Field Tags\n    \n- protobuf source code\n```protobuf\nmessage foo {\n    // @gorm.tag=column:id;autoIncrement\n    // @json.tag=ID\n    int64 id = 1;\n}\n```\n- generated go source code\n```go\ntype Foo struct {\n    state         protoimpl.MessageState\n    sizeCache     protoimpl.SizeCache\n    unknownFields protoimpl.UnknownFields\n\n    Id int64 `protobuf:\"varint,1,opt,name=id,proto3\" json:\"ID,omitempty\" gorm:\"column:id;autoIncrement\"`\n}\n```\n\n### Customize Field Name\n- protobuf source code\n```protobuf\nmessage foo {\n    // @go.name=ID\n    int64 id = 1;\n}\n```\n- generated go source code\n```go\ntype Foo struct {\n    state         protoimpl.MessageState\n    sizeCache     protoimpl.SizeCache\n    unknownFields protoimpl.UnknownFields\n\n    ID int64 `protobuf:\"varint,1,opt,name=id,proto3\" json:\"id,omitempty\"`\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwizacklabs%2Fprotoc-gen-ego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwizacklabs%2Fprotoc-gen-ego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwizacklabs%2Fprotoc-gen-ego/lists"}