首页 > 编程语言 > 详细

Go语言实现简单的文件服务器

时间:2015-06-15 11:23:22      阅读:279      评论:0      收藏:0      [点我收藏+]
package main

import (
	"fmt"
	"net/http"
)

func main() {
	http.Handle("/", http.FileServer(http.Dir("./")))
	http.Handler
	e := http.ListenAndServe(":8080", nil)
	fmt.Println(e)
}

Go语言实现简单的文件服务器

原文:http://blog.csdn.net/fyxichen/article/details/46499893

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!