【文件属性】:
文件名称:httptools:在不破坏原始API的情况下,通过使用Web框架中的功能增强基本的nethttp包
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-13 06:56:03
Go
软件包httptools是Go的net / http的简单帮助程序类型的集合。
有关详细信息和示例,请参阅。
人为的例子
r := httptools . NewRegexpSwitch ( map [ string ]http. Handler {
"/people/(.+)" : httptools. L {
httptools . SilentHandler ( AuthenticationHandler ),
httptools. MethodSwitch {
"GET" : ListPeople ,
"PUT" : http . HandlerFunc ( func ( w http. ResponseWriter , r * http. Request ) {
name := strings . StripPrefix ( r . URL . P
【文件预览】:
httptools-master
----handlerlist_test.go(2KB)
----README.md(2KB)
----doc.go(193B)
----handlerlist.go(2KB)
----mounts.go(753B)
----methodswitch_test.go(2KB)
----regexpswitch_test.go(2KB)
----regexpswitch.go(2KB)
----misc_test.go(1024B)
----mounts_test.go(2KB)
----hostnameswitch_test.go(2KB)
----LICENSE.md(1KB)
----methodswitch.go(439B)
----misc.go(437B)
----hostnameswitch.go(846B)