Micro & pluggable web framework for Go
Go to file
2014-12-29 10:32:45 +08:00
public more tests 2014-12-25 16:31:35 +08:00
compress_test.go more tests & bug fixed 2014-12-26 11:32:14 +08:00
compress.go bug fixed & more tests 2014-12-26 11:15:36 +08:00
context_test.go add some tests 2014-12-25 12:46:07 +08:00
context.go new inject methods 2014-12-28 11:35:19 +08:00
doc.go docs 2014-12-26 09:22:12 +08:00
error.go rename 2014-12-25 15:06:04 +08:00
group_test.go add group 2014-12-29 10:23:55 +08:00
group.go group of group support 2014-12-29 10:32:45 +08:00
LICENSE add some tests 2014-12-25 12:46:07 +08:00
logger_test.go move some handler to contrib 2014-12-17 17:12:06 +08:00
logger.go new inject methods 2014-12-28 11:35:19 +08:00
logo.png add logo 2014-12-25 13:21:52 +08:00
param_test.go add some tests 2014-12-25 12:46:07 +08:00
param.go rename & more tests 2014-12-24 15:05:31 +08:00
pool_test.go more tests 2014-12-25 16:27:12 +08:00
pool.go more tests 2014-12-25 16:27:12 +08:00
README.md docs 2014-12-28 15:07:00 +08:00
recovery_test.go rename & more tests 2014-12-24 15:05:31 +08:00
recovery.go add some tests 2014-12-25 12:46:07 +08:00
request_test.go add some tests 2014-12-25 12:46:07 +08:00
request.go add some tests 2014-12-25 12:46:07 +08:00
response_test.go add some tests 2014-12-25 12:46:07 +08:00
response.go add some convience structs 2014-12-18 10:10:51 +08:00
return_test.go more tests 2014-12-26 11:44:25 +08:00
return.go return improved 2014-12-26 14:51:24 +08:00
router_test.go more tests 2014-12-25 16:27:12 +08:00
router.go add group 2014-12-29 10:23:55 +08:00
static_test.go more tests 2014-12-25 16:31:35 +08:00
static.go more tests & bug fixed 2014-12-26 11:32:14 +08:00
tan_test.go remove unused codes 2014-12-25 16:38:39 +08:00
tan.go add group 2014-12-29 10:23:55 +08:00

Tango Build Status

Tango Logo

Package tango is a micro & pluggable web framework for Go.

Current version: 0.1.0

Getting Started

To install Tango:

go get github.com/lunny/tango

The very basic usage of Tango:

package main

import "github.com/lunny/tango"

func main() {
    t := tango.Classic()
    t.Get("/", func() string {
        return "Hello tango!"
    })
    t.Run()
}

Then visit http://localhost:8000 on your browser. Of course, tango support struct form also.

package main

import "github.com/lunny/tango"

type Action struct {}
func (Action) Get() string {
    return "Hello tango!"
}

func main() {
    t := tango.Classic()
    t.Get("/", new(Action))
    t.Run()
}

More document, please see godoc and Wiki

Features

  • Powerful routing & Flexible routes combinations.
  • Directly integrate with existing services.
  • Easy to plugin/unplugin features with modular design.
  • High Performance dependency injection embbed.

Middlewares

Middlewares allow you easily plugin/unplugin features for your Tango applications.

There are already many middlewares to simplify your work:

  • recovery - recover after panic
  • logger - log the request
  • compress - Gzip & Deflate compression
  • static - Serves static files
  • logger - Log the request & inject Logger to action struct
  • param - get the router parameters
  • return - Handle the returned value smartlly
  • request - Inject request to action struct
  • response - Inject response to action struct
  • session - Session manager
  • xsrf - Generates and validates csrf tokens
  • bind - Bind and validates forms
  • render - Go template engine
  • dispatch - Multiple Application support on one server
  • tpongo2 - Pongo2 teamplte engine support

Getting Help

License

This project is under BSD License. See the LICENSE file for the full license text.