LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // godoc: Go Documentation Server | 5 // godoc: Go Documentation Server |
6 | 6 |
7 // Web server tree: | 7 // Web server tree: |
8 // | 8 // |
9 // http://godoc/ main landing page | 9 // http://godoc/ main landing page |
10 // http://godoc/doc/ serve from $GOROOT/doc - spec, mem, tutorial, et
c. | 10 // http://godoc/doc/ serve from $GOROOT/doc - spec, mem, tutorial, et
c. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 "regexp" | 42 "regexp" |
43 "runtime" | 43 "runtime" |
44 "strings" | 44 "strings" |
45 "time" | 45 "time" |
46 ) | 46 ) |
47 | 47 |
48 const defaultAddr = ":6060" // default webserver address | 48 const defaultAddr = ":6060" // default webserver address |
49 | 49 |
50 var ( | 50 var ( |
51 // file system to serve | 51 // file system to serve |
52 » // (with e.g.: zip -r go.zip $GOROOT -i \*.go -i \*.html -i \*.css -i \*
.js -i \*.txt -i \*.c -i \*.h -i \*.s -i \*.png -i \*.jpg -i \*.sh) | 52 » // (with e.g.: zip -r go.zip $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.ic
o) |
53 zipfile = flag.String("zip", "", "zip file providing the file system to
serve; disabled if empty") | 53 zipfile = flag.String("zip", "", "zip file providing the file system to
serve; disabled if empty") |
54 | 54 |
55 // periodic sync | 55 // periodic sync |
56 syncCmd = flag.String("sync", "", "sync command; disabled if empty") | 56 syncCmd = flag.String("sync", "", "sync command; disabled if empty") |
57 syncMin = flag.Int("sync_minutes", 0, "sync interval in minutes; disab
led if <= 0") | 57 syncMin = flag.Int("sync_minutes", 0, "sync interval in minutes; disab
led if <= 0") |
58 syncDelay delayTime // actual sync interval in minutes; usually syncDela
y == syncMin, but syncDelay may back off exponentially | 58 syncDelay delayTime // actual sync interval in minutes; usually syncDela
y == syncMin, but syncDelay may back off exponentially |
59 | 59 |
60 // network | 60 // network |
61 httpAddr = flag.String("http", "", "HTTP service address (e.g., '"+def
aultAddr+"')") | 61 httpAddr = flag.String("http", "", "HTTP service address (e.g., '"+def
aultAddr+"')") |
62 serverAddr = flag.String("server", "", "webserver address for command li
ne searches") | 62 serverAddr = flag.String("server", "", "webserver address for command li
ne searches") |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 case info.PDoc != nil: | 412 case info.PDoc != nil: |
413 info.PDoc.Filter(filter) | 413 info.PDoc.Filter(filter) |
414 } | 414 } |
415 } | 415 } |
416 | 416 |
417 if err := packageText.Execute(os.Stdout, info); err != nil { | 417 if err := packageText.Execute(os.Stdout, info); err != nil { |
418 log.Printf("packageText.Execute: %s", err) | 418 log.Printf("packageText.Execute: %s", err) |
419 } | 419 } |
420 } | 420 } |
LEFT | RIGHT |