生命不止,继续 go go go !!!
博客《Go实战–通过gin-gonic框架搭建restful api服务(github.com/gin-gonic/gin)》跟大家介绍了使用gin+mysql搭建一个restful api服务,今天主要介绍的是httprouter+redis搭建restful api服务。
HttpRouter is a lightweight high performance HTTP request router (also called multiplexer or just mux for short) for Go.
github地址:
https://github.com/julienschmidt/httprouter
获取:
go get github.com/julienschmidt/httprouter
应用:
package main
import (
"fmt"