1
0
mirror of https://github.com/golang/go synced 2024-10-05 02:21:22 -06:00
go/src/cmd/godoc
Robert Griesemer 5268119f26 go/doc, godoc: improved note reading
- A note doesn't have to be in the first
comment of a comment group anymore, and
several notes may appear in the same comment
group (e.g., it is fairly common to have a
TODO(uid) note immediately following another
comment).

- Define a doc.Note type which also contains
note uid and position info.

- Better formatting in godoc output. The position
information is not yet used, but could be used to
locate the note in the source text if desired.

Fixes #4843.

R=r, cnicolaou
CC=gobot, golang-dev
https://golang.org/cl/7496048
2013-03-19 11:14:35 -07:00
..
appinit.go godoc: support Playground examples on App Engine 2012-10-09 09:57:51 +11:00
codewalk.go godoc: replace servePage's positional argument list 2012-03-30 10:42:56 -07:00
dirtrees.go cmd/godoc: use go/build to determine package and example files 2013-02-19 11:19:58 -08:00
doc.go cmd/godoc: use go/build to determine package and example files 2013-02-19 11:19:58 -08:00
filesystem.go bytes, strings: add TrimPrefix and TrimSuffix 2013-02-01 08:41:25 -08:00
format.go gofmt: apply gofmt -w src misc 2012-10-30 13:38:01 -07:00
godoc.go go/doc, godoc: improved note reading 2013-03-19 11:14:35 -07:00
index.go godoc: correctly categorize interface methods, performance tuning 2012-05-24 10:56:35 -07:00
main.go cmd/godoc: move note argument to godoc.go 2013-03-04 09:02:45 +11:00
parser.go cmd/godoc: use go/build to determine package and example files 2013-02-19 11:19:58 -08:00
play-appengine.go cmd/godoc: fix format strings. 2013-02-08 12:00:35 +11:00
play-local.go godoc: support Playground examples on App Engine 2012-10-09 09:57:51 +11:00
play.go go/format: Package format implements standard formatting of Go source. 2012-11-27 10:29:49 -08:00
README.godoc-app cmd/godoc: update App Engine README and script for Go 1 2012-04-26 14:24:53 +08:00
setup-godoc-app.bash godoc: support Playground examples on App Engine 2012-10-09 09:57:51 +11:00
snippet.go cmd, pkg/go/*: fix "go vet" warnings for go/ast and go/printer 2012-02-16 22:43:41 +11:00
spec.go renaming_4: gofix -r everything/but/src/pkg 2011-11-08 15:43:02 -08:00
template.go go/format: Package format implements standard formatting of Go source. 2012-11-27 10:29:49 -08:00
throttle.go use new time API 2011-11-30 12:01:46 -05:00
utils.go godoc: support $GOPATH, simplify file system code 2012-03-05 10:02:46 -05:00
zip.go godoc: support $GOPATH, simplify file system code 2012-03-05 10:02:46 -05: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
  https://developers.google.com/appengine/downloads#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):

	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
	runtime: go
	api_version: go1

	handlers:
	- url: /.*
	  script: _go_app

* The godoc/ directory contains a copy of the files under $GOROOT/src/cmd/godoc
  with doc.go excluded (it belongs to pseudo-package "documentation")


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 .