1
0
mirror of https://github.com/golang/go synced 2024-10-01 09:38:36 -06:00
go/lib/godoc/search.txt
Robert Griesemer 041dc0a1c2 godoc: show packages matching a query at the top
Also: fix layout of textual search results and
fix a field reference in the respective template.

Fixes #1987.

R=rsc, r
CC=golang-dev
https://golang.org/cl/4962061
2011-09-08 15:35:56 -07:00

47 lines
1.2 KiB
Plaintext

QUERY
{{.Query}}
{{with .Alert}}{{.}}
{{end}}{{/* .Alert */}}{{/*
---------------------------------------
*/}}{{with .Alt}}DID YOU MEAN
{{range .Alts}} {{.}}
{{end}}{{end}}{{/* .Alt */}}{{/*
---------------------------------------
*/}}{{with .Pak}}PACKAGE {{$.Query}}
{{range .}}{{.Pak.Path}}
{{end}}
{{end}}{{/* .Pak */}}{{/*
---------------------------------------
*/}}{{with .Hit}}{{with .Decls}}PACKAGE-LEVEL DECLARATIONS
{{range .}}package {{.Pak.Name}}
{{range $file := .Files}}{{range .Groups}}{{range .}} {{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 .}} {{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}}