{"id":39533035,"url":"https://github.com/zituocn/gow","last_synced_at":"2026-01-18T06:30:39.103Z","repository":{"id":57614526,"uuid":"375997495","full_name":"zituocn/gow","owner":"zituocn","description":"gow is a golang HTTP web framework","archived":false,"fork":false,"pushed_at":"2025-07-29T03:48:21.000Z","size":521,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-29T05:44:47.365Z","etag":null,"topics":["beego","framework","gin","golang","mux","web"],"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/zituocn.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":"2021-06-11T11:06:09.000Z","updated_at":"2025-07-29T03:47:51.000Z","dependencies_parsed_at":"2023-02-05T16:00:44.526Z","dependency_job_id":"790e720a-fd6a-40a6-9db7-e7d8f9653ebc","html_url":"https://github.com/zituocn/gow","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/zituocn/gow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zituocn%2Fgow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zituocn%2Fgow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zituocn%2Fgow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zituocn%2Fgow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zituocn","download_url":"https://codeload.github.com/zituocn/gow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zituocn%2Fgow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["beego","framework","gin","golang","mux","web"],"created_at":"2026-01-18T06:30:39.026Z","updated_at":"2026-01-18T06:30:39.084Z","avatar_url":"https://github.com/zituocn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gow\ngow is a golang HTTP web framework\n\n![gow logo](docs/logo.png)\n\n\n\u003e 借鉴和参考的项目：gin/beego/mux\n\n## 项目地址\n\n[https://github.com/zituocn/gow](https://github.com/zituocn/gow)\n\n## 特性\n\n* 类 `gin` 的 `Context` 封装、路由分组和 middleware，可快速入门\n* 使用 `regexp` 实现路由完全匹配，支持大小写忽略\n* 统一的配置入口(ini格式)，也可实现自己喜欢的配置方式\n* 支持服务器端渲染HTML页面，可自由扩展HTML模板函数\n* 可以自由选择封装在lib的sdk，如 mysql redis nsq rpc mem-cache oauth pay 等\n\n## 1. 快速开始\n\n```sh\n# 创建一个hello的项目\nmkdir hello\n\ncd hello\n\n# 使用go mod\ngo mod init\n\n# 安装gow\n\ngo get github.com/zituocn/gow\n```\n\n### 1.1 创建 main.go\n\n```go\npackage main\n\nimport (\n\t\"github.com/zituocn/gow\"\n)\n\nfunc main() {\n\tr := gow.Default()\n\n\tr.GET(\"/\", func(c *gow.Context) {\n\t\tc.JSON(gow.H{\n\t\t\t\"code\": 0,\n\t\t\t\"msg\":  \"success\",\n\t\t})\n\t})\n\n\t//default :8080\n\tr.Run()\n}\n```\n\n也可以写成这样\n\n```go\npackage main\n\nimport (\n\t\"github.com/zituocn/gow\"\n)\n\nfunc main() {\n\tr := gow.Default()\n\tr.GET(\"/\", IndexHandler)\n\t//default :8080\n\tr.Run()\n}\n\n// IndexHandler response h\nfunc IndexHandler(c *gow.Context) {\n\th := map[string]interface{}{\n\t\t\"project\": \"gow\",\n\t\t\"website\": \"https://github.com/zituocn/gow\",\n\t}\n\tc.JSON(h)\n}\n```\n\n自定义method，使用 `r.Handle`\n\n```go\npackage main\n\nimport \"github.com/zituocn/gow\"\n\nfunc main() {\n\tr := gow.Default()\n\tr.Handle(\"GET,POST\", \"/\", func(c *gow.Context) {\n\t\tc.String(\"index\")\n\t})\n}\n```\n\n### 1.2 运行\n\n```sh\ngo run main.go\n```\n\n运行结果\n\n```sh\nListening and serving HTTP on http://127.0.0.1:8080\n```\n\n### 1.3 访问\n\n*curl访问*\n\n```sh\ncurl -i http://127.0.0.1:8080\n```\n\n请求结果\n\n```sh\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\nDate: Tue, 08 Jun 2021 08:51:25 GMT\nContent-Length: 67\n\n{\n  \"project\": \"gow\",\n  \"website\": \"https://github.com/zituocn/gow\"\n}\n```\n\n浏览器访问\n\n```sh\n在浏览器访问：http://127.0.0.1:8080\n```\n\n---\n\n## 一些演示代码\n\n可直接运行\n\n* [github.com/zituocn/gow-demo](https://github.com/zituocn/gow-demo)\n\n---\n\n## 2. 更多文档\n\n* [路由详解 \u0026\u0026 路由参数 \u0026\u0026 路由分组](https://github.com/zituocn/gow/blob/main/docs/route.md)\n* [中间件(middleware) 使用](https://github.com/zituocn/gow/blob/main/docs/middleware.md)\n* [获取请求值](https://github.com/zituocn/gow/blob/main/docs/request.md)\n* [输出值 \u0026\u0026 JSON / XML / JSONP / YAML](https://github.com/zituocn/gow/blob/main/docs/response.md)\n* [统一配置文件](https://github.com/zituocn/gow/blob/main/docs/config.md)\n* [做一个网站 \u0026\u0026 HTML模板使用指南](https://github.com/zituocn/gow/blob/main/docs/website.md)\n* [HTML模板函数](https://github.com/zituocn/gow/blob/main/docs/html.md)\n* [文件的上传及下载](https://github.com/zituocn/gow/blob/main/docs/upload.md)\n* [实现反向代理(new)](https://github.com/zituocn/gow/blob/main/docs/proxy.md)\n* [lib 库介绍：logx mysql config ](https://github.com/zituocn/logx)\n\n## 3. 感谢\n\n* [beego](https://github.com/beego/beego) -\u003e 参考了1.x中的HTML模板设计\n* [gin](https://github.com/gin-gonic/gin) -\u003e 参考了 `engine` 和 `Context` 设计\n* [mux](https://github.com/gorilla/mux)   -\u003e 参考了 路由设计\n* [gorm](https://github.com/go-gorm/gorm) -\u003e 推荐使用 gorm\n* [gini](https://github.com/gkzy/gini)     -\u003e 用来操作 `ini` 格式的配置文件\n\n## 4. License\n\nMIT License. See the LICENSE file for details.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzituocn%2Fgow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzituocn%2Fgow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzituocn%2Fgow/lists"}