【发布时间】:2017-06-03 20:41:43
【问题描述】:
http.Handle("/static/", http.FileServer(http.Dir(""))) 有什么问题?
我能找到的最短示例如下:
fs := http.FileServer(http.Dir("static"))
http.Handle("/static/", http.StripPrefix("/static/", fs))
http.StripPrefix 有必要吗?
【问题讨论】:
标签: go