当前位置: 首页 > 工具软件 > HttpRouter > 使用案例 >

Go实战--通过httprouter和redis框架搭建restful api服务(github.com/julienschmidt/httprouter)

舒博雅
2023-12-01

生命不止,继续 go go go !!!

博客《Go实战–通过gin-gonic框架搭建restful api服务(github.com/gin-gonic/gin)》跟大家介绍了使用gin+mysql搭建一个restful api服务,今天主要介绍的是httprouter+redis搭建restful api服务。

httprouter

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"
    
 类似资料: