List of simple rest services using Go programming language and some third party packages. e.g. (gorilla/mux
, httprouter
, alice
).
-
ServeMux is an HTTP request multiplexer, by creating a new
ServeMux
orCustomServeMux
we can handle multiple routes. WithServeMux
we can handle different endpoints using a function/handler other than an if/else statement. -
httprouter
routes the HTTP request by HTTP method to particular handler, it matches the REST methods such as (GET
,POST
,PUT
, and so on). This library supports url queries and params by modifying the parameter of handler function. This library is very lightweight and fast performance. -
gorila/mux
is a wonderful package for writing beautiful routes for web applications and API servers. Gorilla Mux provides tons of options to control routing such as path-based matching, query-base matching, domain-base matching, sub-domain base, and reverse URL generation. -
alice
library reduces the complexity of chaining the middleware when the list of middleware is big. Instead of calling a middleware within a middleware as a callback.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
The images, svg icons and gif animations are from Gophers
Copyright ©️ 2022. This project is under CC0 licensed.