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.

8.4 KiB

Tango 简体中文

Build Status badge Join the chat at

Tango Logo

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

Getting Started

To install Tango:

go get

A classic usage of Tango below:

package main

import (


type Action struct {

func (Action) Get() interface{} {
    if true {
        return map[string]string{
            "say": "Hello tango!",
    return errors.New("something error")

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

Then visit http://localhost:8000 on your browser. You will get

{"say":"Hello tango!"}

If you change true after if to false, then you will get

{"err":"something error"}

This code will automatically convert returned map or error to a json because we has an embedded struct tango.JSON.


  • Powerful routing & Flexible routes combinations.
  • Directly integrate with existing services.
  • Easy to plugin features with modular design.
  • High performance dependency injection embedded.


Middlewares allow you easily plugin features for your Tango applications.

There are already many middlewares to simplify your work:





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