diff options
| author | Andrew Balholm <andybalholm@gmail.com> | 2011-07-09 15:10:39 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2011-07-09 15:10:39 -0700 |
| commit | b053400e37a994b773694b6f428b54724168c8e1 (patch) | |
| tree | e2f2d2299e20aaf40467a5dd121c9a82052eacf5 /src/pkg/http | |
| parent | 3987b91213e6e0d2e0b87fe8c79d2b0fe4923909 (diff) | |
| download | go-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.go | 2 |
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)) |
