]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/godoc: cleanups
authorRobert Griesemer <gri@golang.org>
Thu, 28 Mar 2013 20:05:30 +0000 (13:05 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 28 Mar 2013 20:05:30 +0000 (13:05 -0700)
- 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

doc/style.css
lib/godoc/package.txt
src/cmd/godoc/doc.go
src/cmd/godoc/index.go
src/cmd/godoc/utils.go

index 3d881b03a7c258a36384614d7ac74660b5d1efb8..6ab9afbdea6f7b45d666e074e77e5925b7754478 100644 (file)
@@ -12,7 +12,7 @@ pre {
        line-height: 18px;
 }
 pre .comment {
-       color: #375EAB;
+       color: #006600;
 }
 pre .highlight,
 pre .highlight-comment,
index 407be578750a5417ef90978071b458e169f03cd0..d191621c005bd9d57d2f440d21e843e40edf5c9c 100644 (file)
@@ -19,8 +19,8 @@ package {{.Name}}
 CONSTANTS
 
 {{range .}}{{node $ .Decl}}
-{{comment_text .Doc "    " "\t"}}{{end}}
-{{end}}{{/*
+{{comment_text .Doc "    " "\t"}}
+{{end}}{{end}}{{/*
 
 ---------------------------------------
 
@@ -28,8 +28,8 @@ CONSTANTS
 VARIABLES
 
 {{range .}}{{node $ .Decl}}
-{{comment_text .Doc "    " "\t"}}{{end}}
-{{end}}{{/*
+{{comment_text .Doc "    " "\t"}}
+{{end}}{{end}}{{/*
 
 ---------------------------------------
 
@@ -38,8 +38,7 @@ FUNCTIONS
 
 {{range .}}{{node $ .Decl}}
 {{comment_text .Doc "    " "\t"}}
-{{example_text $ .Name "    "}}
-{{end}}{{end}}{{/*
+{{example_text $ .Name "    "}}{{end}}{{end}}{{/*
 
 ---------------------------------------
 
@@ -58,8 +57,8 @@ TYPES
 {{example_text $ .Name "    "}}
 {{end}}{{range .Methods}}{{node $ .Decl}}
 {{comment_text .Doc "    " "\t"}}
-{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name "    "}}
-{{end}}{{end}}{{end}}{{end}}{{/*
+{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name "    "}}{{end}}
+{{end}}{{end}}{{end}}{{/*
 
 ---------------------------------------
 
index e5f5324cd47c9812f19086b37494f3a391e872fc..1fa57a8b31a63b288b1a84f0da37a32211042ea6 100644 (file)
@@ -61,6 +61,8 @@ The flags are:
                to the indexer (the indexer will never finish), a value of 1.0
                means that index creation is running at full throttle (other
                goroutines may get no time while the index is built)
+       -links=true:
+               link identifiers to their declarations
        -write_index=false
                write index to a file; the file name must be specified with
                -index_files
index 91c56461a3504de34d31e3786a639d2ef2576104..8198fca0d0d401963a0d805ec4feb734f0f0c367 100644 (file)
@@ -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
 // number of files to index. The advantage over a blacklist is that unexpected
 // (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
 // present as key in whitelisted.
index 7def015c8a997e5e88f292bcf7bb0d55a7ce7d2f..0cdb7ff7af4e665c3042aa4a90dfc346bfa6f9cd 100644 (file)
@@ -56,8 +56,6 @@ func isText(s []byte) bool {
        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.
 var textExt = map[string]bool{
        ".css": false, // must be served raw