Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c5b3a4fb
Commit
c5b3a4fb
authored
Oct 14, 2011
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godoc: updates for latest Go app-engine release.
R=adg CC=golang-dev
https://golang.org/cl/5273044
parent
92b7b482
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
59 deletions
+23
-59
src/cmd/godoc/README.godoc-app
src/cmd/godoc/README.godoc-app
+19
-23
src/cmd/godoc/appinit.go
src/cmd/godoc/appinit.go
+3
-35
src/cmd/godoc/setup-godoc-app.bash
src/cmd/godoc/setup-godoc-app.bash
+1
-1
No files found.
src/cmd/godoc/README.godoc-app
View file @
c5b3a4fb
...
...
@@ -4,16 +4,14 @@ license that can be found in the LICENSE file.
godoc on appengine
------------------
(documentation in progress)
Prerequisites
-------------
* Go appengine SDK 1.5.
3 - 2011-08-17
* Go appengine SDK 1.5.
5 - 2011-10-11
http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Go
* go_appengine_sdk_darwin_amd64-1.5.3.zip
Go sources at tip under $GOROOT
* Go sources at tip under $GOROOT
Directory structure
...
...
@@ -26,20 +24,9 @@ Directory structure
app-engine release and version of godoc):
alt/
archive/
go/
ast/
doc/
parser/
...
http/
encoding/binary/
go/*
index/suffixarray/
mime/
path/filepath/
sort/
strings/
template/
url/
app.yaml
godoc.zip
godoc/
...
...
@@ -49,9 +36,9 @@ Directory structure
For instance:
application: godoc-app
version: 1-5-
4
version: 1-5-
5
runtime: go
api_version:
2
api_version:
3
handlers:
- url: /.*
...
...
@@ -68,17 +55,26 @@ Directory structure
* 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 godoc
-----------------
Configuring
and running
godoc
-----------------
------------
R
un
To configure godoc, r
un
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 .
src/cmd/godoc/appinit.go
View file @
c5b3a4fb
...
...
@@ -2,43 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// To run godoc under app engine, substitute main.go with
// this file (appinit.go), provide a .zip file containing
// the file system to serve, the index file (or files)
// containing the pre-computed search index and adjust
// the configuration parameters in appconfig.go accordingly.
//
// The current app engine SDK may be based on an older Go
// release version. To correct for version skew, copy newer
// packages into the alt directory (e.g. alt/strings) and
// adjust the imports in the godoc source files (e.g. from
// `import "strings"` to `import "alt/strings"`). Both old
// and new packages may be used simultaneously as long as
// there is no package global state that needs to be shared.
//
// The directory structure should look as follows:
//
// godoc-app // directory containing the app engine app
// alt // alternative packages directory to
// // correct for version skew
// strings // never version of the strings package
// ... //
// app.yaml // app engine control file
// godoc.zip // .zip file containing the file system to serve
// godoc // contains godoc sources
// appinit.go // this file instead of godoc/main.go
// appconfig.go // godoc for app engine configuration
// ... //
// index.split.* // index file(s) containing the search index to serve
//
// To run app the engine emulator locally:
//
// dev_appserver.py -a 0 godoc-app
//
// The godoc home page is served at: <hostname>:8080 and localhost:8080.
package
main
// This file replaces main.go when running godoc under app-engine.
// See README.godoc-app for details.
import
(
"archive/zip"
"http"
...
...
src/cmd/godoc/setup-godoc-app.bash
View file @
c5b3a4fb
...
...
@@ -72,7 +72,7 @@ cleanup() {
makeZipfile
()
{
echo
"*** make
$APPDIR
/
$ZIPFILE
"
zip
-q
-r
$APPDIR
/
$ZIPFILE
$GOROOT
-i
\*
.go
-i
\*
.html
-i
\*
.css
-i
\*
.js
-i
\*
.txt
-i
\*
.c
-i
\*
.h
-i
\*
.s
-i
\*
.png
-i
\*
.jpg
-i
\*
.sh
-i
favicon
.ico
zip
-q
-r
$APPDIR
/
$ZIPFILE
$GOROOT
-i
\*
.go
-i
\*
.html
-i
\*
.css
-i
\*
.js
-i
\*
.txt
-i
\*
.c
-i
\*
.h
-i
\*
.s
-i
\*
.png
-i
\*
.jpg
-i
\*
.sh
-i
\*
.ico
}
makeIndexfile
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment