aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/http
diff options
context:
space:
mode:
authorAndrew Balholm <andybalholm@gmail.com>2011-07-09 15:10:39 -0700
committerBrad Fitzpatrick <bradfitz@golang.org>2011-07-09 15:10:39 -0700
commitb053400e37a994b773694b6f428b54724168c8e1 (patch)
treee2f2d2299e20aaf40467a5dd121c9a82052eacf5 /src/pkg/http
parent3987b91213e6e0d2e0b87fe8c79d2b0fe4923909 (diff)
downloadgo-b053400e37a994b773694b6f428b54724168c8e1.tar.xz
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
Diffstat (limited to 'src/pkg/http')
-rw-r--r--src/pkg/http/triv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/http/triv.go b/src/pkg/http/triv.go
index bff6a106d9..54b12333f5 100644
--- a/src/pkg/http/triv.go
+++ b/src/pkg/http/triv.go
@@ -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))