summaryrefslogtreecommitdiff
path: root/src/pkg/net/http/example_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/http/example_test.go')
-rw-r--r--src/pkg/net/http/example_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/net/http/example_test.go b/src/pkg/net/http/example_test.go
index 22073eaf7..eed3beeea 100644
--- a/src/pkg/net/http/example_test.go
+++ b/src/pkg/net/http/example_test.go
@@ -54,3 +54,8 @@ func ExampleFileServer() {
// we use StripPrefix so that /tmpfiles/somefile will access /tmp/somefile
http.Handle("/tmpfiles/", http.StripPrefix("/tmpfiles/", http.FileServer(http.Dir("/tmp"))))
}
+
+func ExampleStripPrefix() {
+ // we use StripPrefix so that /tmpfiles/somefile will access /tmp/somefile
+ http.Handle("/tmpfiles/", http.StripPrefix("/tmpfiles/", http.FileServer(http.Dir("/tmp"))))
+}