用 Go 编写 HTTP 处理程序的可组合框架。
Siesta is a framework for writing composable HTTP handlers in Go. It supports typed URL parameters, middleware chains, and context passing.
Siesta offers a Service type, which is a collection of middleware chains and handlers rooted at a base URI. There is no distinction between a middleware function and a handler function; they are all considered to be handlers and have access to the same arguments.
Siesta accepts many types of handlers. Refer to the GoDoc documentation for Service.Route for more information.
Here is the simple program in the examples directory. It demonstrates the use of a Service, routing, middleware, and a Context.
…Siesta also provides utilities to manage URL parameters similar to the flag package. Refer to the params example for a demonstration.
We only accept pull requests for minor fixes or improvements. This includes:
Please open issues to discuss new features. Pull requests for new features will be rejected, so we recommend forking the repository and making changes in your fork for your use case.
Siesta is licensed under the MIT license. The router, which is adapted from httprouter, is licensed separately.
暂无开放 Issues,或尚未同步最近议题。