用于Go的轻量级快速HTTP路由器。-Golang开发

时间:2021-05-26 19:11:35
【文件属性】:
文件名称:用于Go的轻量级快速HTTP路由器。-Golang开发
文件大小:4.27MB
文件格式:ZIP
更新时间:2021-05-26 19:11:35
Golang Miscellaneous track Track是使用Trie / Prefix数据结构构建的,用于Go的快速,轻量级的HTTP路由器,它不会破坏标准的net / http处理程序。 安装go get -u github.com/monirz/track用法包track Track是使用Trie / Prefix数据结构构建的,用于Go的快速,轻量级的HTTP路由器,它不会破坏标准的net / http处理程序。 安装go get -u github.com/monirz/track用法包main import(“ fmt”“ net / http”“ github.com/monirz/track”)func main(){路由器:= track.New()路由器。 Get(“ / users”,func(w http.ResponseWriter,r * http.Request){fmt.Fprintf(w,“ Hello users!”)})http.ListenAndServe(“:8090”,路由器)}使用中间件func主要的() {
【文件预览】:
track-master
----README.md(1002B)
----track.test(8.1MB)
----.github()
--------workflows()
----router_test.go(2KB)
----examples()
--------main.go(592B)
----router.go(1KB)
----go.mod(40B)
----mux_test.go(3KB)
----middleware.go(1KB)
----go.sum(0B)
----mux.go(3KB)

网友评论