Micro & pluggable web framework for Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.0KB

  1. // Copyright 2015 The Tango Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Tango is a micro & pluggable web framework for Go language.
  5. // package main
  6. // import "gitea.com/lunny/tango"
  7. // type Action struct {
  8. // }
  9. // func (Action) Get() string {
  10. // return "Hello tango!"
  11. // }
  12. // func main() {
  13. // t := tango.Classic()
  14. // t.Get("/", new(Action))
  15. // t.Run()
  16. // }
  17. // Middlewares allow you easily plugin/unplugin features for your Tango applications.
  18. // There are already many [middlewares](https://gitea.com/tango) to simplify your work:
  19. // - recovery - recover after panic
  20. // - compress - Gzip & Deflate compression
  21. // - static - Serves static files
  22. // - logger - Log the request & inject Logger to action struct
  23. // - param - get the router parameters
  24. // - return - Handle the returned value smartlly
  25. // - ctx - Inject context to action struct
  26. // - [session](https://gitea.com/tango/session) - Session manager, with stores support:
  27. // * Memory - memory as a session store
  28. // * [Redis](https://gitea.com/tango/session-redis) - redis server as a session store
  29. // * [nodb](https://gitea.com/tango/session-nodb) - nodb as a session store
  30. // * [ledis](https://gitea.com/tango/session-ledis) - ledis server as a session store)
  31. // - [xsrf](https://gitea.com/tango/xsrf) - Generates and validates csrf tokens
  32. // - [binding](https://gitea.com/tango/binding) - Bind and validates forms
  33. // - [renders](https://gitea.com/tango/renders) - Go template engine
  34. // - [dispatch](https://gitea.com/tango/dispatch) - Multiple Application support on one server
  35. // - [tpongo2](https://gitea.com/tango/tpongo2) - Pongo2 teamplte engine support
  36. // - [captcha](https://gitea.com/tango/captcha) - Captcha
  37. // - [events](https://gitea.com/tango/events) - Before and After
  38. // - [flash](https://gitea.com/tango/flash) - Share data between requests
  39. // - [debug](https://gitea.com/tango/debug) - Show detail debug infomaton on log
  40. package tango