{"id":23182750,"url":"https://github.com/chenxyzl/gsgen","last_synced_at":"2026-05-07T08:38:08.115Z","repository":{"id":229794164,"uuid":"770841805","full_name":"chenxyzl/gsgen","owner":"chenxyzl","description":"gsgen getter,setter,json.Marshal/Unmarshal,bson.Marshal/Unmarshal, support mongo dirty incremental update","archived":false,"fork":false,"pushed_at":"2024-07-03T08:05:20.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T11:33:10.102Z","etag":null,"topics":["bson","code-generation","dirty","generate","getter","incremental-update","json","mongo","setter"],"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/chenxyzl.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":"2024-03-12T09:01:04.000Z","updated_at":"2024-07-03T08:04:45.000Z","dependencies_parsed_at":"2024-06-25T11:49:12.234Z","dependency_job_id":"44885949-f339-42f1-8f83-6311e2535a6d","html_url":"https://github.com/chenxyzl/gsgen","commit_stats":null,"previous_names":["chenxyzl/gen_gsm","chenxyzl/gen_tools","chenxyzl/gsgen"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxyzl%2Fgsgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxyzl%2Fgsgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxyzl%2Fgsgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenxyzl%2Fgsgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenxyzl","download_url":"https://codeload.github.com/chenxyzl/gsgen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247281568,"owners_count":20913195,"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":["bson","code-generation","dirty","generate","getter","incremental-update","json","mongo","setter"],"created_at":"2024-12-18T08:21:55.087Z","updated_at":"2026-05-07T08:38:03.088Z","avatar_url":"https://github.com/chenxyzl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## gsgen\n- 用go的ast来生成struct对象的方法列表getter,setter,json.Marshal/Unmarshal,bson.Marshal/Unmarshal,String,Clone,Clean,支持增量mongo的更新\n\n### 怎么使用/how to run\n- 安装gsgen_tools: go install github.com/chenxyzl/gsgen/gsgen_tools@latest\n- 执行: gsgen_tools -d=\"./example/nest\" -f=\".model.go,.mod.go\" -s -b -a=\"// test head annotations\" -i=\"github.com/chenxyzl/gsgen/example/common,github.com/chenxyzl/gsgen/example/common.Common\"\n    - -d 表示目录\n    - -f 表示文件后缀\n    - -s 可选,表示导出setter[即true:Setter|false:setter]\n    - -b 可选,表示生成bson的序列化和反序列化\n    - -a 可选,数组,表示追加在头部的注释(一般用于给生成的文件添加额外的提示信息等)\n    - -i 可选,数组,表示忽略检查的外部包,也可以指定外部包的特定类型(用于导入外部包类型,注:外部包对象的的安全无法保证，增量更新都不支持，建议外部包对象也用本工具生成)\n    - 支持的命令参考请执行 ./gsgen_tools -h\n- 参考: Makefile","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenxyzl%2Fgsgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenxyzl%2Fgsgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenxyzl%2Fgsgen/lists"}