1
0
mirror of https://github.com/golang/go synced 2024-11-21 23:04:39 -07:00

http: update triv.go with gofix

Sample code in triv.go wouldn't compile because it didn't use the new
FileSystem interface.
This was discussed on golang-nuts on July 7.
https://groups.google.com/forum/#!topic/golang-nuts/NMhZk3Ft_Vc

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4684044
This commit is contained in:
Andrew Balholm 2011-07-09 15:10:39 -07:00 committed by Brad Fitzpatrick
parent 3987b91213
commit b053400e37

View File

@ -138,7 +138,7 @@ func main() {
expvar.Publish("counter", ctr)
http.Handle("/", http.HandlerFunc(Logger))
http.Handle("/go/", http.FileServer(*webroot, "/go/"))
http.Handle("/go/", http.StripPrefix("/go/", http.FileServer(http.Dir(*webroot))))
http.Handle("/flags", http.HandlerFunc(FlagServer))
http.Handle("/args", http.HandlerFunc(ArgServer))
http.Handle("/go/hello", http.HandlerFunc(HelloServer))