Popularity
7.6
Stable
Activity
0.0
Stable
836
77
108

Programming language: Go
Tags: Web Frameworks    
Latest version: v0.5.6

tango alternatives and similar packages

Based on the "Web Frameworks" category.
Alternatively, view tango alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of tango or a related project?

Add another 'Web Frameworks' Package

README

Tango [简体中文](README_CN.md)

CircleCI codecov Join the chat at https://img.shields.io/discord/323705316027924491.svg

[Tango Logo](logo.png)

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

Current version: v0.5.0 Version History

Getting Started

To install Tango:

go get github.com/lunny/tango

A classic usage of Tango below:

package main

import (
    "errors"
    "github.com/lunny/tango"
)

type Action struct {
    tango.JSON
}

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))
    t.Run()
}

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.

Features

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

Middlewares

Middlewares allow you easily plugin features for your Tango applications.

There are already many middlewares to simplify your work:

Documentation

Discuss

Cases

License

This project is under BSD License. See the [LICENSE](LICENSE) file for the full license text.


*Note that all licence references and agreements mentioned in the tango README section above are relevant to that project's source code only.