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

2015-08-25 0 409
Go语言实现简单的文件服务器
    package main  
      
    import (  
        "fmt"  
        "net/http"  
    )  
      
    func main() {  
        http.Handle("/", http.FileServer(http.Dir("./")))  
        e := http.ListenAndServe(":8080", nil)  
        fmt.Println(e)  
    }  

遇见资源网 golang Go语言实现简单的文件服务器 http://www.ox520.com/13615.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务