From 06a923ada04606943d07cb8bd0cb387eb696272c Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Sat, 19 Feb 2011 05:46:20 +1100 Subject: [PATCH] godoc: serve robots.txt raw R=gri, niemeyer, rsc, r2, r CC=golang-dev https://golang.org/cl/4188063 --- robots.txt | 2 ++ src/cmd/godoc/godoc.go | 1 + 2 files changed, 3 insertions(+) create mode 100644 robots.txt diff --git a/robots.txt b/robots.txt new file mode 100644 index 00000000000..1f53798bb4f --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go index c91dc33dbbc..c0943cd6080 100644 --- a/src/cmd/godoc/godoc.go +++ b/src/cmd/godoc/godoc.go @@ -91,6 +91,7 @@ func registerPublicHandlers(mux *http.ServeMux) { mux.Handle(pkgHandler.pattern, &pkgHandler) mux.HandleFunc("/doc/codewalk/", codewalk) mux.HandleFunc("/search", search) + mux.Handle("/robots.txt", fileServer) mux.HandleFunc("/", serveFile) }