
您需要使用
http.StripPrefix处理程序:
http.Handle("/files/", http.StripPrefix("/files/", http.FileServer(http.Dir("."))))看到这里:http :
//golang.org/pkg/net/http/#example_FileServer_stripPrefix
欢迎分享,转载请注明来源:内存溢出

您需要使用
http.StripPrefix处理程序:
http.Handle("/files/", http.StripPrefix("/files/", http.FileServer(http.Dir("."))))看到这里:http :
//golang.org/pkg/net/http/#example_FileServer_stripPrefix
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)