{"id":13367411,"url":"https://github.com/lunny/tanGo","last_synced_at":"2025-03-12T18:32:46.517Z","repository":{"id":24707069,"uuid":"28118640","full_name":"lunny/tango","owner":"lunny","description":"This is only a mirror and Moved to https://gitea.com/lunny/tango","archived":true,"fork":false,"pushed_at":"2019-05-17T03:31:14.000Z","size":367,"stargazers_count":832,"open_issues_count":9,"forks_count":109,"subscribers_count":75,"default_branch":"master","last_synced_at":"2024-07-31T01:30:14.122Z","etag":null,"topics":["golang","middleware","webframework"],"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/lunny.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}},"created_at":"2014-12-17T03:07:09.000Z","updated_at":"2024-07-12T23:16:26.000Z","dependencies_parsed_at":"2022-08-17T17:05:06.237Z","dependency_job_id":null,"html_url":"https://github.com/lunny/tango","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunny%2Ftango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunny%2Ftango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunny%2Ftango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunny%2Ftango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lunny","download_url":"https://codeload.github.com/lunny/tango/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221309982,"owners_count":16795837,"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":["golang","middleware","webframework"],"created_at":"2024-07-30T00:01:47.428Z","updated_at":"2024-10-24T11:31:19.645Z","avatar_url":"https://github.com/lunny.png","language":"Go","readme":"Tango [简体中文](README_CN.md)\n=======================\n\n[![CircleCI](https://circleci.com/gh/lunny/tango.svg?style=shield)](https://circleci.com/gh/lunny/tango)  [![codecov](https://codecov.io/gh/lunny/tango/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/tango)\n[![](https://goreportcard.com/badge/github.com/lunny/tango)](https://goreportcard.com/report/github.com/lunny/tango)\n[![Join the chat at https://img.shields.io/discord/323705316027924491.svg](https://img.shields.io/discord/323705316027924491.svg)](https://discord.gg/7Ckxjwu)\n\n![Tango Logo](logo.png)\n\nPackage tango is a micro \u0026 pluggable web framework for Go.\n\n##### Current version: v0.5.0   [Version History](https://github.com/lunny/tango/releases)\n\n## Getting Started\n\nTo install Tango:\n\n    go get github.com/lunny/tango\n\nA classic usage of Tango below:\n\n```go\npackage main\n\nimport (\n    \"errors\"\n    \"github.com/lunny/tango\"\n)\n\ntype Action struct {\n    tango.JSON\n}\n\nfunc (Action) Get() interface{} {\n    if true {\n        return map[string]string{\n            \"say\": \"Hello tango!\",\n        }\n    }\n    return errors.New(\"something error\")\n}\n\nfunc main() {\n    t := tango.Classic()\n    t.Get(\"/\", new(Action))\n    t.Run()\n}\n```\n\nThen visit `http://localhost:8000` on your browser. You will get\n```\n{\"say\":\"Hello tango!\"}\n```\n\nIf you change `true` after `if` to `false`, then you will get\n```\n{\"err\":\"something error\"}\n```\n\nThis code will automatically convert returned map or error to a json because we has an embedded struct `tango.JSON`.\n\n## Features\n\n- Powerful routing \u0026 Flexible routes combinations.\n- Directly integrate with existing services.\n- Easy to plugin features with modular design.\n- High performance dependency injection embedded.\n\n## Middlewares\n\nMiddlewares allow you easily plugin features for your Tango applications.\n\nThere are already many [middlewares](https://github.com/tango-contrib) to simplify your work:\n\n- [recovery](https://github.com/lunny/tango/wiki/Recovery) - recover after panic\n- [compress](https://github.com/lunny/tango/wiki/Compress) - Gzip \u0026 Deflate compression\n- [static](https://github.com/lunny/tango/wiki/Static) - Serves static files\n- [logger](https://github.com/lunny/tango/wiki/Logger) - Log the request \u0026 inject Logger to action struct\n- [param](https://github.com/lunny/tango/wiki/Params) - get the router parameters\n- [return](https://github.com/lunny/tango/wiki/Return) - Handle the returned value smartlly\n- [context](https://github.com/lunny/tango/wiki/Context) - Inject context to action struct\n- [session](https://github.com/tango-contrib/session) - [![CircleCI](https://circleci.com/gh/tango-contrib/session/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/session/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/session/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/session) Session manager, [session-redis](http://github.com/tango-contrib/session-redis), [session-nodb](http://github.com/tango-contrib/session-nodb), [session-ledis](http://github.com/tango-contrib/session-ledis), [session-ssdb](http://github.com/tango-contrib/session-ssdb)\n- [xsrf](https://github.com/tango-contrib/xsrf) - [![CircleCI](https://circleci.com/gh/tango-contrib/xsrf/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/xsrf/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/xsrf/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/xsrf) Generates and validates csrf tokens\n- [binding](https://github.com/tango-contrib/binding) - [![CircleCI](https://circleci.com/gh/tango-contrib/binding/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/binding/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/binding/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/binding) Bind and validates forms\n- [renders](https://github.com/tango-contrib/renders) - [![CircleCI](https://circleci.com/gh/tango-contrib/renders/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/renders/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/renders/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/renders) Go template engine\n- [dispatch](https://github.com/tango-contrib/dispatch) - [![CircleCI](https://circleci.com/gh/tango-contrib/dispatch/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/dispatch/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/dispatch/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/dispatch) Multiple Application support on one server\n- [tpongo2](https://github.com/tango-contrib/tpongo2) - [![CircleCI](https://circleci.com/gh/tango-contrib/tpongo2/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/tpongo2/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/tpongo2/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/tpongo2) [Pongo2](https://github.com/flosch/pongo2) teamplte engine support\n- [captcha](https://github.com/tango-contrib/captcha) - [![CircleCI](https://circleci.com/gh/tango-contrib/captcha/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/captcha/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/captcha/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/captcha) Captcha\n- [events](https://github.com/tango-contrib/events) - [![CircleCI](https://circleci.com/gh/tango-contrib/events/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/events/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/events/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/events) Before and After\n- [flash](https://github.com/tango-contrib/flash) - [![CircleCI](https://circleci.com/gh/tango-contrib/flash/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/flash/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/flash/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/flash) Share data between requests\n- [debug](https://github.com/tango-contrib/debug) - [![CircleCI](https://circleci.com/gh/tango-contrib/debug/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/debug/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/debug/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/debug) show detail debug infomaton on log\n- [basicauth](https://github.com/tango-contrib/basicauth) - [![CircleCI](https://circleci.com/gh/tango-contrib/basicauth/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/basicauth/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/basicauth/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/basicauth) basicauth middleware\n- [authz](https://github.com/tango-contrib/authz) - [![Build Status](https://travis-ci.org/tango-contrib/authz.svg?branch=master)](https://travis-ci.org/tango-contrib/authz) [![Coverage Status](https://coveralls.io/repos/github/tango-contrib/authz/badge.svg?branch=master)](https://coveralls.io/github/tango-contrib/authz?branch=master) manage permissions via ACL, RBAC, ABAC\n- [cache](https://github.com/tango-contrib/cache) - [![CircleCI](https://circleci.com/gh/tango-contrib/cache/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/cache/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/cache/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/cache) cache middleware - cache-memory, cache-file, [cache-ledis](https://github.com/tango-contrib/cache-ledis), [cache-nodb](https://github.com/tango-contrib/cache-nodb), [cache-mysql](https://github.com/tango-contrib/cache-mysql), [cache-postgres](https://github.com/tango-contrib/cache-postgres), [cache-memcache](https://github.com/tango-contrib/cache-memcache), [cache-redis](https://github.com/tango-contrib/cache-redis)\n- [rbac](https://github.com/tango-contrib/rbac) - [![CircleCI](https://circleci.com/gh/tango-contrib/rbac/tree/master.svg?style=svg)](https://circleci.com/gh/tango-contrib/rbac/tree/master) [![codecov](https://codecov.io/gh/tango-contrib/rbac/branch/master/graph/badge.svg)](https://codecov.io/gh/tango-contrib/rbac) rbac control\n\n## Documentation\n\n- [Manual](http://gobook.io/read/github.com/go-tango/manual-en-US/), And you are welcome to contribue for the book by git PR to [github.com/go-tango/manual-en-US](https://github.com/go-tango/manual-en-US)\n- [操作手册](http://gobook.io/read/github.com/go-tango/manual-zh-CN/)，您也可以访问 [github.com/go-tango/manual-zh-CN](https://github.com/go-tango/manual-zh-CN)为本手册进行贡献\n- [API Reference](https://gowalker.org/github.com/lunny/tango)\n\n## Discuss\n\n- [Google Group - English](https://groups.google.com/forum/#!forum/go-tango)\n- QQ Group - 简体中文 #369240307\n\n## Cases\n\n- [GopherTC](https://github.com/jimmykuu/gopher/tree/2.0) - China Discuss Forum\n- [Wego](https://github.com/go-tango/wego) - Discuss Forum\n- [dbweb](https://github.com/go-xorm/dbweb) - DB management web UI\n- [Godaily](http://godaily.org) - [github](https://github.com/godaily/news)\n- [Pugo](https://github.com/go-xiaohei/pugo) - A pugo blog\n- [Gos](https://github.com/go-tango/gos) - Static web server\n- [GoFtpd](https://github.com/goftp/ftpd) - Pure Go cross-platform ftp server\n\n## License\n\nThis project is under BSD License. See the [LICENSE](LICENSE) file for the full license text.\n","funding_links":[],"categories":["Web 框架"],"sub_categories":["高级控制台界面","高級控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunny%2FtanGo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunny%2FtanGo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunny%2FtanGo/lists"}