1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:36:10 -07:00
go/cmd/godoc
Alan Donovan 6c93dbff3e go.tools/godoc: deal with fallout from $GOROOT/src/pkg -> $GOROOT/src renaming.
To avoid breaking URLs, we redirect /src/pkg/* to /src/*.

The URL /pkg is now the "directory" /src, which triggers the
"Packages" index.

All other references to "src/pkg" are now gone,
except a number in the namespace documentation which are
probably still illustrative.

Tested: go test cmd/godoc godoc
        Manual inspection of src and src/pkg pages.
        with GOROOT and GOPATH packages
        -analysis
        /AUTHORS file URL still works

LGTM=bradfitz, adg
R=bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/141770044
2014-09-10 09:02:54 -04:00
..
appinit.go go.tools/cmd/godoc: set corpus.MaxResults in appinit.go 2014-06-13 15:20:15 +10:00
blog.go go.tools/cmd/blog: handle "/blog/" redirect properly 2013-10-03 18:10:57 +10:00
codewalk.go go.tools/godoc: move redirect helpers to new package 2013-10-01 16:32:13 +10:00
dl.go go.tools/cmd/godoc: register redirect handler for /dl/ 2014-06-18 15:44:09 +10:00
doc.go godoc: documentation of -analysis features. 2014-04-16 16:35:08 -04:00
godoc_test.go go.tools/godoc: deal with fallout from $GOROOT/src/pkg -> $GOROOT/src renaming. 2014-09-10 09:02:54 -04:00
handlers.go go.tools/godoc: server mode: add support for type and pointer analysis. 2014-03-14 18:58:22 -04:00
main.go go.tools/godoc: deal with fallout from $GOROOT/src/pkg -> $GOROOT/src renaming. 2014-09-10 09:02:54 -04:00
play.go go.tools/cmd/godoc: update import paths 2013-09-19 10:59:21 +10:00
README.godoc-app go.tools/cmd/godoc: fix app engine version; update build script and readme 2013-10-03 14:29:16 +10:00
remotesearch.go go.tools/cmd/godoc: update appinit.go to use new godoc packages 2013-07-30 14:23:23 +10:00
setup-godoc-app.bash go.tools/godoc: deal with fallout from $GOROOT/src/pkg -> $GOROOT/src renaming. 2014-09-10 09:02:54 -04:00

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

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

* Go appengine SDK
  https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go

* Go sources at tip under $GOROOT

* Godoc sources at tip inside $GOPATH
  (go get -d code.google.com/p/go.tools/cmd/godoc)


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):

	app.yaml
	code.google.com/p/go.tools/cmd/godoc
	godoc.zip
	index.split.*

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

	application: godoc-app
	version: 1
	runtime: go
	api_version: go1

	handlers:
	- url: /.*
	  script: _go_app


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

To configure godoc, run

	bash setup-godoc-app.bash

to prepare an $APPDIR as described above. See the script for details on usage.

To run godoc locally, using the App Engine development server, run

	<path to go_appengine>/dev_appserver.py $APPDIR

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