用于构建API的类似Express的框架[关闭]

I have built some basic APIs with the node.js Express framework. I'm thinking of switching to Go, since callback code gets hard to reason about pretty quickly. I really like Express as a framework, is there something similar in Go?

The Gorilla Toolkit is great. In particular, you might want to look at github.com/gorilla/mux. Larger frameworks exist, but go users tend to opt for the simpler option, because the language and standard library get you quite far and a framework isn't as necessary to manage the complexity as it is in other languages and may just complicate things unnecessarily.

The API docs are a good reference and you can also check out examples of how other people use it.

I've found go-api helpful, but there are several other frameworks out there. If you're looking for a more basic package, the Gorilla Toolkit (note: It's a toolkit, not a framework, so it's much less opinionated)

GoApi: https://github.com/dpapathanasiou/go-api Gorilla: https://github.com/gorilla

Maybe not that similar, but give a look at Revel

This maybe too late for you but I've been working on a clone of Express for Go. I claim it to be 90% complete so as long as it's the right 90% it could work for you.

Source: https://github.com/ricallinson/forgery Site: http://goforgery.appspot.com/