From 5ff4c17907d5b19510a62e08fd8d3b11e62b431d Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Tue, 13 Sep 2011 13:13:40 +0200 Subject: Imported Upstream version 60 --- lib/godoc/codewalk.html | 58 +++++++++++++++++++++ lib/godoc/codewalkdir.html | 16 ++++++ lib/godoc/dirlist.html | 31 ++++++++++++ lib/godoc/error.html | 9 ++++ lib/godoc/godoc.html | 69 +++++++++++++++++++++++++ lib/godoc/package.html | 122 +++++++++++++++++++++++++++++++++++++++++++++ lib/godoc/package.txt | 82 ++++++++++++++++++++++++++++++ lib/godoc/search.html | 98 ++++++++++++++++++++++++++++++++++++ lib/godoc/search.txt | 40 +++++++++++++++ 9 files changed, 525 insertions(+) create mode 100644 lib/godoc/codewalk.html create mode 100644 lib/godoc/codewalkdir.html create mode 100644 lib/godoc/dirlist.html create mode 100644 lib/godoc/error.html create mode 100644 lib/godoc/godoc.html create mode 100644 lib/godoc/package.html create mode 100644 lib/godoc/package.txt create mode 100644 lib/godoc/search.html create mode 100644 lib/godoc/search.txt (limited to 'lib/godoc') diff --git a/lib/godoc/codewalk.html b/lib/godoc/codewalk.html new file mode 100644 index 000000000..2835c6e82 --- /dev/null +++ b/lib/godoc/codewalk.html @@ -0,0 +1,58 @@ + + + + + + + +
+
+
+
+
+ + Pop Out Code + + +
+
+ +
+
+
+ code on leftright + code width 70% + filepaths shownhidden +
+
+
+
+ {{range .Step}} +
+ +
{{html .Title}}
+
+ {{with .Err}} + ERROR LOADING FILE: {{html .}}

+ {{end}} + {{.XML}} +
+
{{html .}}
+
+ {{end}} +
+
+ previous step + • + next step +
+
+
diff --git a/lib/godoc/codewalkdir.html b/lib/godoc/codewalkdir.html new file mode 100644 index 000000000..b7674c6ce --- /dev/null +++ b/lib/godoc/codewalkdir.html @@ -0,0 +1,16 @@ + + + +{{range .}} + + {{$name_html := html .Name}} + + + + +{{end}} +
{{$name_html}} {{html .Title}}
diff --git a/lib/godoc/dirlist.html b/lib/godoc/dirlist.html new file mode 100644 index 000000000..a3e1a2fa8 --- /dev/null +++ b/lib/godoc/dirlist.html @@ -0,0 +1,31 @@ + + +

+ + + + + + + + + + + +{{range .}} + + {{$name_html := fileInfoName . | html}} + + + + + + +{{end}} + +
File Bytes Modified
..
{{$name_html}}{{html .Size}}{{fileInfoTime . | html}}
+

diff --git a/lib/godoc/error.html b/lib/godoc/error.html new file mode 100644 index 000000000..7573aa236 --- /dev/null +++ b/lib/godoc/error.html @@ -0,0 +1,9 @@ + + +

+{{html .}} +

diff --git a/lib/godoc/godoc.html b/lib/godoc/godoc.html new file mode 100644 index 000000000..671160d5a --- /dev/null +++ b/lib/godoc/godoc.html @@ -0,0 +1,69 @@ + + + + +{{with .Title}} + {{html .}} - The Go Programming Language +{{else}} + The Go Programming Language +{{end}} + + + + + +
+
+

The Go Programming Language

+ + +
+
+ + {{with .Menu}} + + {{end}} + + {{with .Title}} +

{{html .}}

+ {{end}} + {{with .Subtitle}} + {{html .}} + {{end}} + + + + + + {{printf "%s" .Content}} +
+
+

Build version {{html .Version}}. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.

+
+
+ + diff --git a/lib/godoc/package.html b/lib/godoc/package.html new file mode 100644 index 000000000..7a89d780c --- /dev/null +++ b/lib/godoc/package.html @@ -0,0 +1,122 @@ + +{{with .PAst}} +
{{node_html . $.FSet}}
+{{end}} +{{with .PDoc}} + + {{if $.IsPkg}} +

import "{{html .ImportPath}}"

+ {{end}} + {{comment_html .Doc}} + {{if $.IsPkg}} + {{with .Filenames}} +

+

Package files

+ + {{range .}} + {{.|filename|html}} + {{end}} + +

+ {{end}} + {{end}} + {{with .Consts}} +

Constants

+ {{range .}} + {{comment_html .Doc}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{end}} + {{with .Vars}} +

Variables

+ {{range .}} + {{comment_html .Doc}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{end}} + {{with .Funcs}} + {{range .}} + {{/* Name is a string - no need for FSet */}} + {{$name_html := html .Name}} +

func {{$name_html}}

+

{{node_html .Decl $.FSet}}

+ {{comment_html .Doc}} + {{end}} + {{end}} + {{with .Types}} + {{range .}} + {{$tname_html := node_html .Type.Name $.FSet}} +

type {{$tname_html}}

+ {{comment_html .Doc}} +

{{node_html .Decl $.FSet}}

+ {{range .Consts}} + {{comment_html .Doc}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{range .Vars}} + {{comment_html .Doc}} +
{{node_html .Decl $.FSet}}
+ {{end}} + {{range .Factories}} + {{$name_html := html .Name}} +

func {{$name_html}}

+

{{node_html .Decl $.FSet}}

+ {{comment_html .Doc}} + {{end}} + {{range .Methods}} + {{$name_html := html .Name}} +

func ({{node_html .Recv $.FSet}}) {{$name_html}}

+

{{node_html .Decl $.FSet}}

+ {{comment_html .Doc}} + {{end}} + {{end}} + {{end}} + {{with .Bugs}} +

Bugs

+ {{range .}} + {{comment_html .}} + {{end}} + {{end}} +{{end}} +{{with .PList}} +

Other packages

+

+ {{/* PList entries are strings - no need for FSet */}} + {{range .}} + {{html .}}
+ {{end}} +

+{{end}} +{{with .Dirs}} +

+ Need more packages? The + Package Dashboard + provides a list of goinstallable packages. +

+ {{/* DirList entries are numbers and strings - no need for FSet */}} +

Subdirectories

+

+ + + + + + + + + + {{range .List}} + + {{repeat `` .Depth}} + + + + + {{end}} +
Name Synopsis
..
{{html .Name}}{{html .Synopsis}}
+

+{{end}} diff --git a/lib/godoc/package.txt b/lib/godoc/package.txt new file mode 100644 index 000000000..179b33493 --- /dev/null +++ b/lib/godoc/package.txt @@ -0,0 +1,82 @@ +{{with .PAst}}{{node . $.FSet}}{{end}}{{/* + +--------------------------------------- + +*/}}{{with .PDoc}}{{if $.IsPkg}}PACKAGE + +package {{.PackageName}} +import "{{.ImportPath}}" + +{{else}}COMMAND DOCUMENTATION + +{{end}}{{.Doc}}{{/* + +--------------------------------------- + +*/}}{{with .Consts}} +CONSTANTS + +{{range .}}{{node .Decl $.FSet}} +{{.Doc}}{{end}} +{{end}}{{/* + +--------------------------------------- + +*/}}{{with .Vars}} +VARIABLES + +{{range .}}{{node .Decl $.FSet}} +{{.Doc}}{{end}} +{{end}}{{/* + +--------------------------------------- + +*/}}{{with .Funcs}} +FUNCTIONS + +{{range .}}{{node .Decl $.FSet}} +{{.Doc}} +{{end}}{{end}}{{/* + +--------------------------------------- + +*/}}{{with .Types}} +TYPES + +{{range .}}{{node .Decl $.FSet}} +{{.Doc}} +{{range .Consts}}{{node .Decl $.FSet}} +{{.Doc}} +{{end}}{{range .Vars}}{{node .Decl $.FSet}} +{{.Doc}} +{{end}}{{range .Factories}}{{node .Decl $.FSet}} +{{.Doc}} +{{end}}{{range .Methods}}{{node .Decl $.FSet}} +{{.Doc}} +{{end}}{{end}}{{end}}{{/* + +--------------------------------------- + +*/}}{{with .Bugs}} +BUGS + +{{range .}}{{.}} +{{end}}{{end}}{{end}}{{/* + +--------------------------------------- + +*/}}{{with .PList}} +OTHER PACKAGES + +{{range .}} +{{.}}{{end}} +{{end}}{{/* + +--------------------------------------- + +*/}}{{with .Dirs}} +SUBDIRECTORIES + +{{range .List}} + {{.Name}}{{end}} +{{end}} diff --git a/lib/godoc/search.html b/lib/godoc/search.html new file mode 100644 index 000000000..36c34f54d --- /dev/null +++ b/lib/godoc/search.html @@ -0,0 +1,98 @@ + +{{$query_url := urlquery .Query}} +{{with .Alert}} +

+ {{html .}} +

+{{end}} +{{with .Alt}} +

+ Did you mean: + {{range .Alts}} + {{html .}} + {{end}} +

+{{end}} +{{with .Hit}} + {{with .Decls}} +

Package-level declarations

+ {{range .}} + {{$pkg_html := pkgLink .Pak.Path | html}} +

package {{html .Pak.Name}}

+ {{range .Files}} + {{$src_html := srcLink .File.Path | html}} + {{range .Groups}} + {{range .Infos}} + {{$src_html}}:{{infoLine .}} + {{infoSnippet_html .}} + {{end}} + {{end}} + {{end}} + {{end}} + {{end}} + {{with .Others}} +

Local declarations and uses

+ {{range .}} + {{$pkg_html := pkgLink .Pak.Path | html}} +

package {{html .Pak.Name}}

+ {{range .Files}} + {{$src_html := srcLink .File.Path | html}} + {{$src_html}} + + {{range .Groups}} + + + + + + + {{end}} +
{{infoKind_html .Kind}} + {{range .Infos}} + {{infoLine .}} + {{end}} +
+ {{end}} + {{end}} + {{end}} +{{end}} +{{with .Textual}} + {{if $.Complete}} +

{{html $.Found}} textual occurrences

+ {{else}} +

More than {{html $.Found}} textual occurrences

+

+ Not all files or lines containing "{{html $.Query}}" are shown. +

+ {{end}} +

+ + {{range .}} + {{$src_html := srcLink .Filename | html}} + + + + + + + + {{end}} + {{if not $.Complete}} + + {{end}} +
+ {{$src_html}}: + {{len .Lines}} + {{range .Lines}} + {{html .}} + {{end}} + {{if not $.Complete}} + ... + {{end}} +
...
+

+{{end}} diff --git a/lib/godoc/search.txt b/lib/godoc/search.txt new file mode 100644 index 000000000..1dd64afdb --- /dev/null +++ b/lib/godoc/search.txt @@ -0,0 +1,40 @@ +QUERY + {{.Query}} +{{with .Alert}} +{{.}} +{{end}}{{/* .Alert */}}{{/* + +--------------------------------------- + +*/}}{{with .Alt}} +DID YOU MEAN +{{range .Alts}} {{.}} +{{end}}{{end}}{{/* .Alts */}}{{/* + +--------------------------------------- + +*/}}{{with .Hit}}{{with .Decls}} +PACKAGE-LEVEL DECLARATIONS + +{{range .}}package {{.Pak.Name}} +{{range $file := .Files}}{{range .Groups}}{{range .Infos}} {{srcLink $file.File.Path}}:{{infoLine .}}{{end}} +{{end}}{{end}}{{/* .Files */}} +{{end}}{{end}}{{/* .Decls */}}{{/* + +--------------------------------------- + +*/}}{{with .Others}} +LOCAL DECLARATIONS AND USES + +{{range .}}package {{.Pak.Name}} +{{range $file := .Files}}{{range .Groups}}{{range .Infos}} {{srcLink $file.File.Path}}:{{infoLine .}} +{{end}}{{end}}{{end}}{{/* .Files */}} +{{end}}{{end}}{{/* .Others */}}{{end}}{{/* .Hit */}}{{/* + +--------------------------------------- + +*/}}{{if .Textual}}{{if .Complete}}{{.Found}} TEXTUAL OCCURRENCES{{else}}MORE THAN {{.Found}} TEXTUAL OCCURRENCES{{end}} + +{{range .Textual}}{{len .Lines}} {{srcLink .Filename}} +{{end}}{{if not .Complete}}... ... +{{end}}{{end}} -- cgit v1.2.3