Golang简单文件服务器,20行代码开启一个http文件服务器,分享运行目录文件 package main import ( "fmt" "net/http" ) func main() { http.Handle("/", http.FileServer(http.Dir("./"))) e := http.ListenAndServe(":8080", nil) fmt.Println(e) } 文章导航 Spearware Networks:$5.95/月/1核@Ryzen 9 3900X/1GB内存/30GB NVMe空间/不限流量/200Mbps端口/KVM/加拿大