chi:Minalist Go web 框架的乐趣和探索

时间:2021-07-17 11:06:05
【文件属性】:
文件名称:chi:Minalist Go web 框架的乐趣和探索
文件大小:8KB
文件格式:ZIP
更新时间:2021-07-17 11:06:05
Go 气 最小的网络框架 package main import ( "fmt" "./chi" "net/http" "log" "encoding/json" ) // Basic "Hello World" function func helloWorld ( w http. ResponseWriter , r * http. Request ) { chi . Send ( w , "

Hello World!

" , "continue" , nil ) } func main () { // GET /foo // Response is JSON chi . Get ( "/foo" , func ( w http. ResponseWriter , r * http. Request ) { if json , err
【文件预览】:
chi-master
----server.go(1KB)
----middleware()
--------middleware.go(616B)
----LICENSE(11KB)
----.gitignore(259B)
----README.md(2KB)
----chi()
--------chi.go(1KB)
----router()
--------router.go(1KB)

网友评论