Which web framework is best for REST API on production level?

i am working with a company that is looking for a web framework to use it on production level our needs are
-REST apis
-Rapid development
-Stable framework
please recommend me best framework and please don’t suggest to use std/lib because RAPID development is our first priority

I found the following frameworks being referenced a lot

https://iris-go.com/ (See and validate the discussion below on Iris before choosing it)
https://github.com/urfave/negroni Middleware

The folloing libraries help you reload your webservice for faster development.

1 Like

You can find a excelent list of tools and libraries for Go in https://github.com/avelino/awesome-go



Gin is very popular 25k stars on github and a lot of activity

1 Like

@laliluna, there is an old no-no for Iris:


There’s also more recent reports about it too and they are still bad:


I’m writing an open source forum without framework and ORM, maybe you will like it.

1 Like

My first REST server development in Go used the go-swagger tool - here is a excerpt from one of our repos README file (names changed to use example).

[Swagger](https://github.com/go-swagger/go-swagger) tool was used to generate this server.
Since the tool only supports v2 of the swagger spec, that version must be used when generating

[Install Swagger](https://goswagger.io/install.html)

$ swagger generate server --target . --name example --spec example.2.0.yaml

$ tree -d
├── cmd
│   └── example-server
├── models
├── restapi
│   └── operations
│       └── example

You can easily update your API file and regenerate the server. Of course, you still have to create handlers to implement your logic.

Some of my colleges are have also used: https://github.com/protocolbuffers/protobuf
Specifically for Go: https://github.com/golang/protobuf

We are able to generate a server that handles both REST and gRPC, which may be of interest to you.

1 Like

Maybe worth adding an edit to your post @laliluna to point here. Just to make sure people who don’t read further than the first answer are aware of the issues associated with the Iris’s maintainer :slight_smile:

1 Like

I recommend echo. It is open source and packtpub published a book on how to use and learn it. It can be used for implementing both Web Apps and Web APIs - including REST.

If the goal is to develop just an API, I recommend goa. It is an open source framework that takes a design first approach for designing API. It also generates the swagger documentation automatically, from those APIs, which are described in a DSL, which itself is Go (the DSL is not a home-made language or yaml).

The goa approach might look a bit too much work, but I recommend to use it. When you reach around seven endpoints in your API, your future self will thank you! Yet again it all comes down to the problem at hand, the requirements and your resources.

1 Like

These 2 frameworks are most popular for production level.
Echo has many useful middlewares


It’s sad that https://beego.me/ is not mentioned. It can also be used for production level.

1 Like

Thank you. i need production level tool

Thankyou man for your response :slight_smile:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.