httpserver-go

时间:2024-03-26 09:30:53
【文件属性】:

文件名称:httpserver-go

文件大小:14KB

文件格式:ZIP

更新时间:2024-03-26 09:30:53

Go

去http服务 如何使用 package main import ( "encoding/json" "fmt" "httpserver" ) func main () { r := httpserver . NewRouter () // f, e := os.OpenFile("1.log", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600) // fmt.Println(f, e) // r.Use(httpserver.Logger(), httpserver.LoggerWidthConf(httpserver.LoggerConf{ // Writer: f, // })) r . Get ( "/hello" , nil ) // r.Use(httpserver.Recover()) r . Use ( http


【文件预览】:
httpserver-go-master
----example()
--------main.go(2KB)
----debug.go(626B)
----pathRule.go(2KB)
----readme.md(2KB)
----mode.go(216B)
----context.go(2KB)
----def_test.go(336B)
----router.go(3KB)
----router_test.go(1KB)
----LICENSE(1KB)
----recover_test.go(629B)
----middleware.go(91B)
----logger.go(1KB)
----pathRule_test.go(460B)
----.gitignore(7B)
----go.sum(1024B)
----utils()
--------path_test.go(210B)
--------fn.go(297B)
--------fn_test.go(241B)
--------path.go(282B)
--------time.go(162B)
----recover.go(3KB)
----go.mod(71B)

网友评论