routes:Go Web应用程序的[已弃用]路由API

时间:2024-05-30 12:22:03
【文件属性】:

文件名称:routes:Go Web应用程序的[已弃用]路由API

文件大小:32KB

文件格式:ZIP

更新时间:2024-05-30 12:22:03

Go

routes.go 用于Go编程语言的简单HTTP路由API go get github.com/drone/routes 有关更多信息,请参见: : 入门 package main import ( "fmt" "github.com/drone/routes" "net/http" ) func Whoami(w http.ResponseWriter, r *http.Request) { params := r.URL.Query() lastName := params.Get(":last") firstName := params.Get(":first") fmt.Fprintf(w, "you are %s %s", firstName, lastName) } func main() { mux :=


【文件预览】:
routes-master
----LICENSE.txt(1KB)
----bench()
--------bench_test.go(2KB)
----routes.go(8KB)
----doc.go(989B)
----exp()
--------router()
--------user()
--------context()
--------README.md(3KB)
--------cookie()
--------routes()
----README.md(3KB)
----.gitignore(475B)
----routes_test.go(5KB)

网友评论