Go語言實(shí)現(xiàn)簡單的文件服務(wù)器

清華大佬耗費(fèi)三個(gè)月吐血整理的幾百G的資源,免費(fèi)分享!....>>>

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