package main import( "net/http" ) func main(){ http.Handle("/", http.FileServer(http.Dir("D:/web/AmazeUI-2.7.2/"))) http.ListenAndServe(":8080", nil) }
018-Go将磁盘目录实现简单的静态Web服务
原文:https://www.cnblogs.com/yshyee/p/9356565.html