{"id":13600300,"url":"https://github.com/gotomicro/ego","last_synced_at":"2025-10-06T19:43:16.663Z","repository":{"id":37104040,"uuid":"315315266","full_name":"gotomicro/ego","owner":"gotomicro","description":"A simple and component-based microservice kit for go. 一个简单的基于组件的 Go 微服务套件。","archived":false,"fork":false,"pushed_at":"2025-08-23T04:39:24.000Z","size":2817,"stargazers_count":980,"open_issues_count":2,"forks_count":158,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-08-24T08:03:22.843Z","etag":null,"topics":["ego","gin","go","gorm","grpc","http","microservice","redis","resty"],"latest_commit_sha":null,"homepage":"https://ego-org.com","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/gotomicro.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://cdn.gocn.vip/gotomicro/s.jpeg"}},"created_at":"2020-11-23T12:56:00.000Z","updated_at":"2025-08-23T04:39:28.000Z","dependencies_parsed_at":"2023-09-27T10:56:30.872Z","dependency_job_id":"08150db8-d057-4138-ad6d-b411d41b3bd2","html_url":"https://github.com/gotomicro/ego","commit_stats":{"total_commits":558,"total_committers":43,"mean_commits":"12.976744186046512","dds":0.478494623655914,"last_synced_commit":"6e6304fb433a412f5fbe82825048283ecba746c2"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"purl":"pkg:github/gotomicro/ego","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotomicro","download_url":"https://codeload.github.com/gotomicro/ego/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotomicro%2Fego/sbom","scorecard":{"id":442191,"data":{"date":"2025-08-11","repo":{"name":"github.com/gotomicro/ego","commit":"a1a569d9507db273bccce59fdf3bd0da36a86473"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"17 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 5/17 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: no topLevel permission defined: .github/workflows/golangci-lint.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/golangci-lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gotomicro/ego/release.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0052 / GHSA-h395-qcrw-5vmq","Warn: Project is vulnerable to: GHSA-3vp4-m3rf-835h","Warn: Project is vulnerable to: GO-2023-1737 / GHSA-2c4m-59x9-fr2g","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T05:49:24.680Z","repository_id":37104040,"created_at":"2025-08-19T05:49:24.680Z","updated_at":"2025-08-19T05:49:24.680Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278670927,"owners_count":26025738,"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-10-06T02:00:05.630Z","response_time":65,"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":["ego","gin","go","gorm","grpc","http","microservice","redis","resty"],"created_at":"2024-08-01T18:00:35.380Z","updated_at":"2025-10-06T19:43:16.634Z","avatar_url":"https://github.com/gotomicro.png","language":"Go","funding_links":["https://cdn.gocn.vip/gotomicro/s.jpeg"],"categories":["Go"],"sub_categories":[],"readme":"## EGO\n[![All Contributors](https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square)](#contributors-)\n[![Go](https://github.com/gotomicro/ego/workflows/Go/badge.svg?branch=master)](https://github.com/gotomicro/ego/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gotomicro/ego)](https://goreportcard.com/report/github.com/gotomicro/ego)\n[![codecov](https://codecov.io/gh/gotomicro/ego/branch/master/graph/badge.svg)](https://codecov.io/gh/gotomicro/ego)\n[![goproxy.cn](https://goproxy.cn/stats/github.com/gotomicro/ego/badges/download-count.svg)](https://goproxy.cn/stats/github.com/gotomicro/ego)\n[![Release](https://img.shields.io/github/v/release/gotomicro/ego.svg?style=flat-square)](https://github.com/gotomicro/ego)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Example](https://img.shields.io/badge/sample-%E6%A0%B7%E4%BE%8B-2ca5e0?style=flat\u0026logo=appveyor)](https://github.com/gotomicro/ego/tree/master/examples)\n[![Doc](https://img.shields.io/badge/doc-%E6%96%87%E6%A1%A3-2ca5e0?style=flat\u0026logo=appveyor)](https://ego.gocn.vip)\n\n## 1 帮助文档\n[https://ego-org.com](https://ego-org.com)\n\n## 2 介绍\nEGO是一个集成了各种工程实践的框架。通过组件化的设计模式，保证了业务方能够统一的调用方式启动各种组件\n\n使用EGO的优势\n* 配置化驱动组件\n* 屏蔽底层组件启动细节\n* 微服务组件的可观测、可治理\n* 可插拔的Ego-Component组件\n* Fail Fast理念和错误友好提示\n\n### 2.1 提升组件熟练度\n我们工程师要想提升组件熟练度，首先要大量看开源组件文档和代码，然后坚持长时间使用，才能形成肌肉记忆，提升我们做业务的速度。而这一切所投入的时间和精力是非常大的。\n\n要减少这个投入成本，让更多开发者使用好优秀的开源组件，EGO的做法是标准化所有开源组件，对其做一层封装，统一各种行为。\n* 统一组件文件名\n* 统一组件配置参数\n* 统一组件调用API\n* 统一组件错误行为\n* 统一组件监控行为\n\n让人掌握了一种组件，就可以举一反三使用其他组件。\n\n### 2.2 提升故障排查效率\n* 统一错误码\n* 组件错误、慢响应、链路、常规请求拦截器埋点（服务端、客户端均会拦截）\n* 收敛错误字段\n* 注入组件关键信息：代码行号、配置名、目标地址、耗时、请求数据、响应数据\n* 调试阶段，错误高亮、格式化友好提示\n* 调试阶段，组件内置debug拦截器\n\n### 2.3 自动生成重复代码\n* 生成代码，配置、数据解析、模版分离\n* 不依赖于语言，构建项目代码\n* 利用Go1.16特性embed，启动web，生成代码\n* 项目地址: [https://github.com/gotomicro/egoctl](https://github.com/gotomicro/egoctl)\n\n## 3 Ego的组件\n我们支持多种EGO组件，加快你的开发速度\n\n| Component Name            | Code                                                                 | Example                                                                        | Doc                                                                                                                 |\n|---------------------------|----------------------------------------------------------------------|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| HTTP Server               | [Code](https://github.com/gotomicro/ego/tree/master/server/egin)     | [Example](https://github.com/gotomicro/ego/tree/master/examples/server/http)   | [Doc](https://ego.gocn.vip/frame/server/http.html)                                                                  |\n| gRPC Server               | [Code](https://github.com/gotomicro/ego/tree/master/server/egrpc)    | [Example](https://github.com/gotomicro/ego/tree/master/examples/server/grpc)   | [Doc](https://ego.gocn.vip/frame/server/grpc.html#example)                                                          |\n| Governance Service        | [Code](https://github.com/gotomicro/ego/tree/master/server/egovernor) | [Example](https://github.com/gotomicro/ego/tree/master/examples/server/governor) | [Doc](https://ego.gocn.vip/frame/server/governor.html)                                                              |\n| Job                       | [Code](https://github.com/gotomicro/ego/tree/master/task/ejob)       | [Example](https://github.com/gotomicro/ego/tree/master/examples/task/job)     | [Doc](https://ego.gocn.vip/frame/task/job.html)                                                                     |\n| Corn job                  | [Code](https://github.com/gotomicro/ego/tree/master/task/ecron)      | [Example](https://github.com/gotomicro/ego/tree/master/examples/task/cron)     | [Doc](https://ego.gocn.vip/frame/task/cron.html#_3-%E5%B8%B8%E8%A7%84%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)          |\n| Distributed Scheduled Job | [Code](https://github.com/gotomicro/ego/tree/master/task/ecron)      | [Example](https://github.com/gotomicro/ego/tree/master/examples/task/cron)     | [Doc](https://ego.gocn.vip/frame/task/cron.html#_4-%E5%88%86%E5%B8%83%E5%BC%8F%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1) |\n| HTTP Client               | [Code](https://github.com/gotomicro/ego/tree/master/client/ehttp)    | [Example](https://github.com/gotomicro/ego/tree/master/examples/http/client)   | [Doc](https://ego.gocn.vip/frame/client/http.html#example)                                                          |\n| gRPC Client               | [Code](https://github.com/gotomicro/ego/tree/master/client/egrpc)    | [Example](https://github.com/gotomicro/ego/tree/master/examples/grpc/direct)   | [Doc](https://ego.gocn.vip/frame/client/grpc.html#_4-%E7%9B%B4%E8%BF%9Egrpc)                                        |\n| gRPC Client using ETCD    | [Code](https://github.com/ego-component/eetcd/tree/master/)           | [Example](https://github.com/ego-component/eetcd/tree/master//examples)         | [Doc](https://ego.gocn.vip/frame/client/grpc.html#_5-%E4%BD%BF%E7%94%A8etcd%E7%9A%84grpc)                           |\n| gRPC Client using k8s     | [Code](https://github.com/ego-component/ek8s/tree/master/)            | [Example](https://github.com/ego-component/ek8s/tree/master//examples)          | [Doc](https://ego.gocn.vip/frame/client/grpc.html#_6-%E4%BD%BF%E7%94%A8k8s%E7%9A%84grpc)                            |\n| Sentinel                  | [Code](https://github.com/gotomicro/ego/tree/master/core/esentinel)  | [Example](https://github.com/gotomicro/ego/tree/master/examples/sentinel/http) | [Doc](https://ego.gocn.vip/frame/client/sentinel.html)                                                              |\n| MySQL                     | [Code](https://github.com/ego-component/egorm/tree/master/)           | [Example](https://github.com/ego-component/egorm/tree/master//examples)         | [Doc](https://ego.gocn.vip/frame/client/gorm.html#example)                                                          |\n| Redis                     | [Code](https://github.com/ego-component/eredis/tree/master/)          | [Example](https://github.com/ego-component/eredis/tree/master//examples)        | [Doc](https://ego.gocn.vip/frame/client/redis.html#example)                                                         |\n| Redis Distributed lock    | [Code](https://github.com/ego-component/eredis/tree/master/)          | [Example](https://github.com/ego-component/eredis/tree/master//examples)        | [Doc](https://ego.gocn.vip/frame/client/redis.html#example)                                                         |\n| Mongo                     | [Code](https://github.com/ego-component/emongo/tree/master/)          | [Example](https://github.com/ego-component/emongo/tree/master//examples)        | [Doc](https://ego.gocn.vip/frame/client/mongo.html)                                                                 |\n| Kafka                     | [Code](https://github.com/ego-component/ekafka/tree/master/)          | [Example](https://github.com/ego-component/ekafka/tree/master//examples)        | [Doc](https://ego.gocn.vip/frame/client/kafka.html)                                                                 |\n| ETCD                      | [Code](https://github.com/ego-component/eetcd/tree/master/)           | [Example](https://github.com/ego-component/eetcd/tree/master//examples)         | [Doc](https://ego.gocn.vip/frame/client/eetcd.html)                                                                 |\n| K8S                       | [Code](https://github.com/ego-component/ek8s/tree/master/)            | [Example](https://github.com/ego-component/ek8s/tree/master//examples)          | [Doc](https://ego.gocn.vip/frame/client/ek8s.html)                                                                  |\n| Oauth2                    | [Code](https://github.com/ego-component/eoauth2/tree/master/)         | [Example](https://github.com/ego-component/eoauth2/tree/master//examples)       ||\n\n* 更多组件请查看:[https://github.com/ego-component](https://github.com/ego-component)\n\n\n## 4 EGO的定义\n### 4.1 框架分层\n我们框架分为三个层次\n* 核心层提供配置、日志、监控和链路，是其他组件的基石\n* 组件层提供客户端、服务端、任务端里的各种组件\n* 胶水层控制了各种组件的生命周期，错误处理\n\n### 4.2 架构图\n![](./docs/images/ego_frame.png)\n\n### 4.3 生命周期\n![](./docs/images/ego_flow.png)\n\n### 4.4 组件分层\n我们认为一切均是组件，我们将组件分为四个部分：\n- Container 处理组件类型、组件配置、组件启动\n- Config    配置参数\n- Component 组件的调用方法\n- Options   配置和组件可选项\n\n## 5 版本要求\n* v0.8.2以下  需要 go大于go1.13\n* v0.8.3后   需要 go大于go1.16\n* v1.0.0后   需要 go大于go1.17\n\n## 6 下载工具\n```bash\nbash \u003c(curl -L https://raw.githubusercontent.com/gotomicro/egoctl/main/getlatest.sh)\n```\n通过以上脚本，可以下载protoc工具全家桶，以及ego的protoc插件和egoctl\n* /usr/local/bin/egoctl               EGO工具\n* /usr/local/bin/protoc               生成Pb工具\n* /usr/local/bin/protoc-gen-go        生成Pb工具\n* /usr/local/bin/protoc-gen-go-grpc   生成gRPC工具\n* /usr/local/bin/protoc-gen-go-errors 生成错误码工具\n* /usr/local/bin/protoc-gen-openapiv2 生成HTTP工具\n* /usr/local/bin/protoc-gen-go-http   生成HTTP工具\n\n\n## 7 特性介绍\n* 配置驱动\n  所有组件启动方式为`组件名称.Load(\"配置名称\").Build()`，可以创建一个组件实例。如以下`http server`，`egin`是组件名称，`server.http`是配置名称\n```go\negin.Load(\"server.http\").Build()\n```\n* 友好的debug\n  通过开启``debug``配置和命令行的``export EGO_DEBUG=true``，\n  我们可以在测试环境里看到所有组件的请求里的行号、配置名、请求地址、耗时、请求数据、响应数据\n\n![](docs/images/client_grpc1.png)\n![](docs/images/client-http.png)\n![](docs/images/client-mysql.png)\n![](docs/images/client-redis.jpg)\n\n并且使用``Goland``同学，可以直接通过行号点击到对应的代码路径(gRPC、HTTP客户端支持行号)\n\n* 链路\n  使用opentelemetry协议，自动将链路加入到日志里，支持oltp协议上报到阿里arms。\n    * gRPC链路\n        * 测试代码\n          [gRPC直连查看链路id](https://github.com/gotomicro/ego/tree/master/examples/grpc/direct)\n        * 服务端链路信息\n\n      ![image](docs/images/trace-server-grpc.png)\n        * 客户端链路信息\n\n      ![image](docs/images/trace-client-grpc.png)\n    * HTTP链路\n\n      ![](docs/images/trace.png)\n\n    * 阿里arms链路   \n      自动记录各个组件的span信息\n\n      ![](docs/images/trace-arms.png)\n\n* [统一的错误信息](https://ego.gocn.vip/awesome/errors.html)\n\n* 统一的监控信息\n\n![](docs/images/metric.png)\n\n## 8 Quick Start\n\n### 8.1 HelloWorld\n配置\n\n```toml\n[server.http]\n    port = 9001\n    host = \"0.0.0.0\"\n```\n代码\n\n```go\npackage main\nimport (\n   \"github.com/gin-gonic/gin\"\n   \"github.com/gotomicro/ego\"\n   \"github.com/gotomicro/ego/core/elog\"\n   \"github.com/gotomicro/ego/server\"\n   \"github.com/gotomicro/ego/server/egin\"\n)\n//  export EGO_DEBUG=true \u0026\u0026 go run main.go --config=config.toml\nfunc main() {\n   if err := ego.New().Serve(func() *egin.Component {\n      server := egin.Load(\"server.http\").Build()\n      server.GET(\"/hello\", func(ctx *gin.Context) {\n         ctx.JSON(200, \"Hello EGO\")\n         return\n      })\n      return server\n   }()).Run(); err != nil {\n      elog.Panic(\"startup\", elog.FieldErr(err))\n   }\n}\n```\n\n### 8.2 使用命令行运行\n```\nexport EGO_DEBUG=true # 默认日志输出到logs目录，开启dev后日志输出到终端\ngo run main.go --config=config.toml\n```\n\n### 8.3 如下所示\n![图片](./docs/images/startup.png)\n\n\n这个时候我们可以发送一个指令，得到如下结果\n```\n➜  helloworld git:(master) ✗ curl http://127.0.0.1:9001/hello\n\"Hello Ego\"%  \n```\n\n### 8.4 更加友好的包编译\n\n使用scripts文件夹里的[包编译](examples/build)，可以看到优雅的version提示\n\n![图片](./docs/images/version.png)\n\n## 9 更新日志\n[Releases](https://github.com/gotomicro/ego/releases)\n\n## 10 加入我们\n加入我们，请在验证信息里添加``ego``关键字\n\n![image](./docs/images/join.jpeg)\n\n## Contributors\n\nThanks for these wonderful people:\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/askuy\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/14119383?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003easkuy\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/sevennt\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/10843736?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eWei Zheng\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://zhuanlan.zhihu.com/c_1209048962315108352\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3054782?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eshaoyuan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://wujunze.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/12997869?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePanda\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/NeoyeElf\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6872731?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003e刘文哲\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/zhjunjun\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/16819579?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ezhangjunjun\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/devincd\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/7844367?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003edevincd\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.jianshu.com/u/f2b47e5528d8\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/9923838?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMing Deng\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/cute-angelia\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/26561606?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAngelia\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.yuque.com/wbofeng\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/54163491?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eWbofeng\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/clannadxr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/9847143?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eclannadxr\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.duanlv.ltd\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/20787331?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLink Duan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://cqs.es\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/20419375?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eCosta\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://kl7sn.github.io\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2037801?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMEX7\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://blog.lincolnzhou.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/3911154?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLincolnZhou\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/optimistic9527\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/37545032?v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eoptimistic9527\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/livepo\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/17000001?s=400\u0026u=0336f4726acdf82e13f4c19f28d6e1de39ea0b9b\u0026v=4\" width=\"64px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003esoeluc\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotomicro%2Fego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotomicro%2Fego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotomicro%2Fego/lists"}