GO1.5标准包http.FileServer的拔高用法.
来源:互联网 发布:小学英语课堂软件 编辑:程序博客网 时间:2024/05/15 07:44
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#0000ff;">package</span><span style=" color:#f57900;"> </span>main
import (
"fmt"
"net/http"
)
func main() {
h := http.FileServer(http.Dir("./"))
http.ListenAndServe(":1789", ce(h))
}
func ce(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Println(r.URL.Path)
h.ServeHTTP(w, r)
})
}
1 0
- GO1.5标准包http.FileServer的拔高用法.
- golang http.FileServer 遇到的坑
- Golang1.8标准库http.Fileserver跟http.ServerFile小例子
- C++ http fileserver 开发手记
- GO1.5实现简单的http并发请求,支持:GET、POST、HEAD、PUT
- Puppet的fileserver注意事项
- Go1.9 安全map用法
- Go1.5 改进摘要
- golang与node.js的http模块性能对比测试(go1)
- 一个简单的文件共享工程 -- FileServer
- Go1.9基于http备份文件中心服务器
- cellForRowAtIndexPath 的标准用法
- cellForRowAtIndexPath 的标准用法
- typedef的标准用法
- Images的标准用法
- cellForRowAtIndexPath 的标准用法
- webserver和fileserver的分离实现方案以及对fileserver上的office文档实现在线编辑的实现
- golang中的http.FileServer通常要跟http.StripPrefix结合使用
- Servlet中用于会话跟踪的三种机制
- Linux编程基础
- hdu4770 状态压缩+枚举
- 写一篇文章纪念一下儿子入学
- HDU3722 Card Game(KM最小费用圈覆盖)
- GO1.5标准包http.FileServer的拔高用法.
- Codeforces Round #250 (Div. 2) 437A The Child and Homework(模拟)
- 给自己的总结
- epoll模型详解 2010-10-09 17:39:38 http://blog.chinaunix.net/uid-20583479-id-1920065.html
- LeetCode(47)Permutations II
- JDK与JRE的区别
- java中的volatile关键字
- C语言---算法(选择排序/冒泡排序/折半查找/进制查表法)
- Spring整合JMS(三)——MessageConverter介绍