diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-04-06 15:14:11 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-04-06 15:14:11 +0200 |
commit | 505c19580e0f43fe5224431459cacb7c21edd93d (patch) | |
tree | 79e2634c253d60afc0cc0b2f510dc7dcbb48497b /misc/godoc/init.go | |
parent | 1336a7c91e596c423a49d1194ea42d98bca0d958 (diff) | |
download | golang-505c19580e0f43fe5224431459cacb7c21edd93d.tar.gz |
Imported Upstream version 1upstream/1
Diffstat (limited to 'misc/godoc/init.go')
-rw-r--r-- | misc/godoc/init.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/misc/godoc/init.go b/misc/godoc/init.go deleted file mode 100644 index 0fd0bd542..000000000 --- a/misc/godoc/init.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file replaces main.go when running godoc under the app engine emulator. -// See the README file for instructions. - -package main - -import ( - "http" - "log" - "os" - "path/filepath" -) - -func serveError(w http.ResponseWriter, r *http.Request, relpath string, err os.Error) { - contents := applyTemplate(errorHTML, "errorHTML", err) // err may contain an absolute path! - w.WriteHeader(http.StatusNotFound) - servePage(w, "File "+relpath, "", "", contents) -} - -func init() { - // set goroot - cwd, err := os.Getwd() - if err != nil { - log.Fatalf("cwd: %s", err) - } - log.Printf("cwd = %s", cwd) - *goroot = filepath.Clean(cwd) - - initHandlers() - readTemplates() - registerPublicHandlers(http.DefaultServeMux) -} |