1
0
mirror of https://github.com/golang/go synced 2024-11-20 06:54:42 -07:00
go/src/cmd/godoc
Russ Cox 965845a86d all: sort imports
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5319072
2011-11-02 15:54:16 -04:00
..
appinit.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
codewalk.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
dirtrees.go godoc, exp/ebnf, exp/types, go/scanner, scanner: use rune 2011-10-25 22:20:20 -07:00
doc.go godoc: documentation for all (not just exported) declarations 2011-10-06 16:06:23 -07:00
filesystem.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
format.go regexp: move to old/regexp, replace with exp/regexp 2011-09-26 18:33:13 -04:00
godoc.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
httpzip.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
index.go all: sort imports 2011-11-02 15:54:16 -04:00
main.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
Makefile godoc: added systematic throttling to indexing goroutine 2011-08-25 17:46:43 -07:00
mapping.go godoc: fix ToAbsolute mapping 2011-10-18 10:28:30 -07:00
parser.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
README.godoc-app godoc: updates for latest Go app-engine release. 2011-10-14 16:06:39 -07:00
setup-godoc-app.bash godoc: updates for latest Go app-engine release. 2011-10-14 16:06:39 -07:00
snippet.go all: sort imports 2011-11-02 15:54:16 -04:00
spec.go godoc, exp/ebnf, exp/types, go/scanner, scanner: use rune 2011-10-25 22:20:20 -07:00
throttle.go godoc: added systematic throttling to indexing goroutine 2011-08-25 17:46:43 -07:00
utils.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00
zip.go non-pkg: gofix -r error -force=error 2011-11-01 22:06:05 -04:00

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.

godoc on appengine
------------------

Prerequisites
-------------

* Go appengine SDK 1.5.5 - 2011-10-11
  http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Go

* Go sources at tip under $GOROOT


Directory structure
-------------------

* Let $APPDIR be the directory containing the app engine files.
  (e.g., $APPDIR=$HOME/godoc-app)

* $APPDIR contains the following entries (this may change depending on
  app-engine release and version of godoc):

	alt/
		encoding/binary/
		go/*
		index/suffixarray/
	app.yaml
	godoc.zip
	godoc/
	index.split.*

* The app.yaml file is set up per app engine documentation.
  For instance:

	application: godoc-app
	version: 1-5-5
	runtime: go
	api_version: 3

	handlers:
	- url: /.*
	  script: _go_app

* The godoc/ directory contains a copy of the files under $GOROOT/src/cmd/godoc
  with modifications:

	- doc.go is excluded (it belongs to pseudo-package ÒdocumentationÓ)
	- main.go is excluded (appinit.go is taking its place)

  Additional manual modifications are required to refer to the alt/ packages
  where the app-engine library is not up-to-date with the godoc version.

* The alt/ directory contains up-to-date copies of Go packages that a tip-based
  godoc is dependent on but which do not yet exist in the current app-engine SDK.
  At the time of this writing (10/14/2011) this is the entire go directory tree
  (for the missing FileSet serialization code in go/token) as well as the
  index/suffixarray package (for the missing suffix array serialization code).
  The latest (alt/)index/suffixarray package internally requires the latest
  version of encoding/binary, which is why it also needs to be present under
  alt/.


Configuring and running godoc
-----------------------------

To configure godoc, run

	bash setup-godoc-app.bash

to create the godoc.zip, index.split.*, and godoc/appconfig.go files
based on $GOROOT and $APPDIR. See the script for details on usage.

To run godoc locally, using the app-engine emulator, run

	<path to google_appengine>/dev_appserver.py $APPDIR

godoc should come up at http://localhost:8080 .