{"id":20339654,"url":"https://github.com/pangum/http","last_synced_at":"2026-03-10T10:31:26.759Z","repository":{"id":57597109,"uuid":"375560405","full_name":"pangum/http","owner":"pangum","description":"盘古Http客户端适配，集成以下功能：1、易用的API；2、统一的调用接口；3、自动配置；4、智能化","archived":false,"fork":false,"pushed_at":"2025-11-20T02:20:17.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T05:05:44.999Z","etag":null,"topics":["framework","go","golang","http","library","resty"],"latest_commit_sha":null,"homepage":"","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/pangum.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-10T03:39:59.000Z","updated_at":"2025-11-20T02:20:14.000Z","dependencies_parsed_at":"2023-11-13T02:31:00.680Z","dependency_job_id":"af3a5fae-97bc-4635-9c7c-6dcddefb8f9b","html_url":"https://github.com/pangum/http","commit_stats":null,"previous_names":["storezhang/pangu-http","pangum/pangu-http"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/pangum/http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangum%2Fhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangum%2Fhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangum%2Fhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangum%2Fhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pangum","download_url":"https://codeload.github.com/pangum/http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangum%2Fhttp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30330538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["framework","go","golang","http","library","resty"],"created_at":"2024-11-14T21:18:00.968Z","updated_at":"2026-03-10T10:31:26.726Z","avatar_url":"https://github.com/pangum.png","language":"Go","readme":"# 盘古 Golang应用程序框架\n[![编译状态](https://github.ruijc.com:20443/api/badges/pangum/pangu/status.svg)](https://github.ruijc.com:20443/pangum/pangu)\n[![Golang质量](https://goreportcard.com/badge/github.com/pangum/pangu)](https://goreportcard.com/report/github.com/pangum/pangu)\n![版本](https://img.shields.io/github/go-mod/go-version/pangum/pangu)\n![仓库大小](https://img.shields.io/github/repo-size/pangum/pangu)\n![最后提交](https://img.shields.io/github/last-commit/pangum/pangu)\n![授权协议](https://img.shields.io/github/license/pangum/pangu)\n![语言个数](https://img.shields.io/github/languages/count/pangum/pangu)\n![最佳语言](https://img.shields.io/github/languages/top/pangum/pangu)\n![星星个数](https://img.shields.io/github/stars/pangum/pangu?style=social)\n\n一个Golang应用程序快速开发框架，有以下特性\n\n- 快速开发\n- 内置配置文件加载\n  - `Yaml`\n  - `Toml`\n  - `Json`\n  - `XML`\n  - 很方便定制自己的配置文件加载器\n- 内置强大的数据验证\n  - 内置强大的且非常多的数据验证器\n  - 很方便的定制自己的数据验证器\n- 强大的扩展功能\n- 强大的配置功能\n  - 徽标\n  - 帮助信息\n  - 命令行\n  - 一切可配置点皆可配置\n- 线程安全\n- 内置依赖注入\n- 语义化\n  - 方便使用\n  - 多态行为，同一个调用在不同的场景下有不同的意义\n\n## 快速开始\n\n`Pangu`使用非常简单，只需要定义两部分代码`启动方法`和`启动器`以及`依赖关系`，对于`依赖关系`\n\n- 可以没有依赖，如果没有，就不需要处理依赖\n- 一般稍微大型一点的系统都会有复杂的依赖关系，而这正是`盘古`框架的强项\n- 对于没有依赖或者依赖非常少的项目，使用`盘古`反而会使代码变多，这个需要大家酌情考虑\n\n`启动方法`代码如下\n\n```go\npackage main\n\nimport (\n    `github.com/pangum/pangu`\n    `github.com/pangum/pangum`\n)\n\nfunc main() {\n    panic(pangu.New(\n        pangu.Named(`ziyunix`),\n        pangu.Banner(`Ziyunix Server`, pangu.BannerTypeAscii),\n    ).Run(newBootstrap))\n}\n```\n\n`启动器`的代码如下\n\n```go\npackage main\n\ntype bootstrap struct {\n    application *pangu.Application\n}\n\nfunc newBootstrap(application *pangu.Application) pangu.Bootstrap {\n    return \u0026bootstrap{\n        application: application,\n    }\n}\n```\n\n`依赖关系`建议像如下处理\n\n```go\npackage rest\n\nimport (\n\t`github.com/pangum/pangu`\n)\n\ntype Server struct {}\n\nfunc newServer(/* 如果有依赖，可以在这里增加依赖：api *Api */) *Server {\n\treturn new(Server)\n}\n\nfunc init() {\n\tpangu.New().Dependencies(\n\t\tnewServer,\n\t\t// 其它依赖\n\t\t// ...\n\t)\n}\n```\n\n\u003e `Pangu`有非常多的配置项，请参看[**使用文档**](https://pangu.pangum.tech)\n\n## 文档\n\n[点击这里查看最新文档](https://pangu.pangum.tech)\n\n## 使用示例\n\n[点击这里查看最新的代码示例](example)\n\n## 项目实践\n\n- [基础项目实战代码](https://github.com/pangum/example)\n  - 数据库操作\n  - 数据库迁移\n  - RESTFul接口\n  - 配置加载\n  - MQTT操作\n\n## 交流\n\n![微信群](doc/.vuepress/public/communication/wxwork.jpg)\n\n## 捐助\n\n![支持宝](https://github.com/storezhang/donate/raw/master/alipay-small.jpg)\n![微信](https://github.com/storezhang/donate/raw/master/weipay-small.jpg)\n\n## 感谢Jetbrains\n\n本项目通过`Jetbrains开源许可IDE`编写源代码，特此感谢\n[![Jetbrains图标](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png)](https://www.jetbrains.com/?from=pangum/grpc)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpangum%2Fhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpangum%2Fhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpangum%2Fhttp/lists"}