Commit 04341b24 authored by Robert Griesemer's avatar Robert Griesemer

cmd/godoc: cleanups

- removed gratuitous empty lines that creeped into command line output
- changed comment color to a dark green so that links don't visually melt into them
- removed some TODOs
- updated doc.go

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8108044
parent 972cb4b4
...@@ -12,7 +12,7 @@ pre { ...@@ -12,7 +12,7 @@ pre {
line-height: 18px; line-height: 18px;
} }
pre .comment { pre .comment {
color: #375EAB; color: #006600;
} }
pre .highlight, pre .highlight,
pre .highlight-comment, pre .highlight-comment,
......
...@@ -19,8 +19,8 @@ package {{.Name}} ...@@ -19,8 +19,8 @@ package {{.Name}}
CONSTANTS CONSTANTS
{{range .}}{{node $ .Decl}} {{range .}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}{{end}} {{comment_text .Doc " " "\t"}}
{{end}}{{/* {{end}}{{end}}{{/*
--------------------------------------- ---------------------------------------
...@@ -28,8 +28,8 @@ CONSTANTS ...@@ -28,8 +28,8 @@ CONSTANTS
VARIABLES VARIABLES
{{range .}}{{node $ .Decl}} {{range .}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}}{{end}} {{comment_text .Doc " " "\t"}}
{{end}}{{/* {{end}}{{end}}{{/*
--------------------------------------- ---------------------------------------
...@@ -38,8 +38,7 @@ FUNCTIONS ...@@ -38,8 +38,7 @@ FUNCTIONS
{{range .}}{{node $ .Decl}} {{range .}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}} {{comment_text .Doc " " "\t"}}
{{example_text $ .Name " "}} {{example_text $ .Name " "}}{{end}}{{end}}{{/*
{{end}}{{end}}{{/*
--------------------------------------- ---------------------------------------
...@@ -58,8 +57,8 @@ TYPES ...@@ -58,8 +57,8 @@ TYPES
{{example_text $ .Name " "}} {{example_text $ .Name " "}}
{{end}}{{range .Methods}}{{node $ .Decl}} {{end}}{{range .Methods}}{{node $ .Decl}}
{{comment_text .Doc " " "\t"}} {{comment_text .Doc " " "\t"}}
{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}} {{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}}{{end}}
{{end}}{{end}}{{end}}{{end}}{{/* {{end}}{{end}}{{end}}{{/*
--------------------------------------- ---------------------------------------
......
...@@ -61,6 +61,8 @@ The flags are: ...@@ -61,6 +61,8 @@ The flags are:
to the indexer (the indexer will never finish), a value of 1.0 to the indexer (the indexer will never finish), a value of 1.0
means that index creation is running at full throttle (other means that index creation is running at full throttle (other
goroutines may get no time while the index is built) goroutines may get no time while the index is built)
-links=true:
link identifiers to their declarations
-write_index=false -write_index=false
write index to a file; the file name must be specified with write index to a file; the file name must be specified with
-index_files -index_files
......
...@@ -651,8 +651,6 @@ func (x *Indexer) addFile(filename string, goFile bool) (file *token.File, ast * ...@@ -651,8 +651,6 @@ func (x *Indexer) addFile(filename string, goFile bool) (file *token.File, ast *
// makes sure that the important files are included and massively reduces the // makes sure that the important files are included and massively reduces the
// number of files to index. The advantage over a blacklist is that unexpected // number of files to index. The advantage over a blacklist is that unexpected
// (non-blacklisted) files won't suddenly explode the index. // (non-blacklisted) files won't suddenly explode the index.
//
// TODO(gri): We may want to make this list customizable, perhaps via a flag.
// Files are whitelisted if they have a file name or extension // Files are whitelisted if they have a file name or extension
// present as key in whitelisted. // present as key in whitelisted.
......
...@@ -56,8 +56,6 @@ func isText(s []byte) bool { ...@@ -56,8 +56,6 @@ func isText(s []byte) bool {
return true return true
} }
// TODO(gri): Should have a mapping from extension to handler, eventually.
// textExt[x] is true if the extension x indicates a text file, and false otherwise. // textExt[x] is true if the extension x indicates a text file, and false otherwise.
var textExt = map[string]bool{ var textExt = map[string]bool{
".css": false, // must be served raw ".css": false, // must be served raw
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment