码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-06-15 11:24:02      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:go语言   go   golang   

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语言实现简单的文件服务器

标签:go语言   go   golang   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!