Versions in this module Expand all Collapse all v0 v0.2.1 Jun 17, 2024 v0.2.0 Jun 15, 2024 v0.1.9 Jun 13, 2024 v0.1.8 Jun 7, 2024 v0.1.7 Jun 7, 2024 v0.1.6 Jun 7, 2024 v0.1.5 Jun 7, 2024 v0.1.4 Jun 7, 2024 v0.1.3 Jun 7, 2024 v0.1.1 Jun 6, 2024 Changes in this version + var ErrFileIndexVersion = errors.New("file index version out of date") + func FormatSelections(w io.Writer, text []byte, lw LinkWriter, links Selection, sw SegmentWriter, ...) + func FormatText(w io.Writer, text []byte, line int, goSource bool, pattern string, ...) + func Linkify(out io.Writer, src []byte) + func LinkifyText(w io.Writer, text []byte, n ast.Node) + type AltWords struct + Alts []string + Canon string + type Corpus struct + Analysis analysis.Result + IndexDirectory func(dir string) bool + IndexDocs bool + IndexEnabled bool + IndexFiles string + IndexFullText bool + IndexGoCode bool + IndexInterval time.Duration + IndexThrottle float64 + MaxResults int + SummarizePackage func(pkg string) (summary string, showList, ok bool) + Verbose bool + func NewCorpus(fs vfs.FileSystem) *Corpus + func (c *Corpus) CurrentIndex() (*Index, time.Time) + func (c *Corpus) FSModifiedTime() time.Time + func (c *Corpus) Init() error + func (c *Corpus) InitVersionInfo() + func (c *Corpus) Lookup(query string) SearchResult + func (c *Corpus) MetadataFor(relpath string) *Metadata + func (c *Corpus) NewIndex() *Index + func (c *Corpus) ReadIndexFrom(r io.Reader) error + func (c *Corpus) RunIndexer() + func (c *Corpus) UpdateIndex() + type DirEntry struct + Depth int + HasPkg bool + Height int + Name string + Path string + RootType vfs.RootType + Synopsis string + type DirList struct + List []DirEntry + MaxHeight int + type Directory struct + Depth int + Dirs []*Directory + HasPkg bool + Name string + Path string + RootType vfs.RootType + Synopsis string + type File struct + Name string + Pak *Pak + func (f *File) Path() string + type FileLines struct + Filename string + Lines []int + type FileRun struct + File *File + Groups []KindRun + type HitList []*PakRun + type Ident struct + Doc string + Name string + Package string + Path string + type Index struct + func (x *Index) CompatibleWith(c *Corpus) bool + func (x *Index) Exports() map[string]map[string]SpotKind + func (x *Index) Idents() map[SpotKind]map[string][]Ident + func (x *Index) ImportCount() map[string]int + func (x *Index) Lookup(query string) (*SearchResult, error) + func (x *Index) LookupRegexp(r *regexp.Regexp, n int) (found int, result []FileLines) + func (x *Index) PackagePath() map[string]map[string]bool + func (x *Index) ReadFrom(r io.Reader) (n int64, err error) + func (x *Index) Snippet(i int) *Snippet + func (x *Index) Stats() Statistics + func (x *Index) WriteTo(w io.Writer) (n int64, err error) + type IndexResult struct + Decls RunList + Others RunList + type Indexer struct + func (x *Indexer) Visit(node ast.Node) ast.Visitor + type KindRun []SpotInfo + func (k KindRun) Len() int + func (k KindRun) Less(i, j int) bool + func (k KindRun) Swap(i, j int) + type LinkWriter func(w io.Writer, offs int, start bool) + type LookupResult struct + Decls HitList + Others HitList + type Metadata struct + AltPaths []string + Path string + Subtitle string + Template bool + Title string + func (m *Metadata) FilePath() string + type Page struct + Body []byte + GoogleAnalytics string + Playground bool + Query string + SearchBox bool + SrcPath string + Subtitle string + Tabtitle string + Title string + TreeView bool + Version string + type PageInfo struct + AnalysisData htmltemplate.JS + CallGraph htmltemplate.JS + CallGraphIndex map[string]int + DirFlat bool + DirTime time.Time + Dirname string + Dirs *DirList + Err error + Examples []*doc.Example + FSet *token.FileSet + IsFiltered bool + IsMain bool + Mode PageInfoMode + Notes map[string][]*doc.Note + PAst map[string]*ast.File + PDoc *doc.Package + TypeInfoIndex map[string]int + func (info *PageInfo) IsEmpty() bool + type PageInfoMode uint + const AllMethods + const FlatDir + const NoFiltering + const NoTypeAssoc + const PageInfoModeQueryString + const ShowSource + type Pak struct + Name string + Path string + type PakRun struct + Files []*FileRun + Pak *Pak + func (p *PakRun) Len() int + func (p *PakRun) Less(i, j int) bool + func (p *PakRun) Swap(i, j int) + type Presentation struct + AdjustPageInfoMode func(req *http.Request, mode PageInfoMode) PageInfoMode + CallGraphHTML *template.Template + Corpus *Corpus + DeclLinks bool + DirlistHTML *template.Template + ErrorHTML *template.Template + ExampleHTML *template.Template + GodocHTML *template.Template + GoogleAnalytics string + ImplementsHTML *template.Template + MethodSetHTML *template.Template + NotesRx *regexp.Regexp + PackageHTML *template.Template + PackageRootHTML *template.Template + SearchCodeHTML *template.Template + SearchDescXML *template.Template + SearchDocHTML *template.Template + SearchHTML *template.Template + SearchResults []SearchResultFunc + SearchTxtHTML *template.Template + ShowPlayground bool + ShowTimestamps bool + TabWidth int + URLForSrc func(src string) string + URLForSrcPos func(src string, line, low, high int) string + URLForSrcQuery func(src, query string, line int) string + func NewPresentation(c *Corpus) *Presentation + func (p *Presentation) CmdFSRoot() string + func (p *Presentation) FileServer() http.Handler + func (p *Presentation) FuncMap() template.FuncMap + func (p *Presentation) GetCmdPageInfo(abspath, relpath string, mode PageInfoMode) *PageInfo + func (p *Presentation) GetPageInfoMode(r *http.Request) PageInfoMode + func (p *Presentation) GetPkgPageInfo(abspath, relpath string, mode PageInfoMode) *PageInfo + func (p *Presentation) HandleSearch(w http.ResponseWriter, r *http.Request) + func (p *Presentation) NewSnippet(fset *token.FileSet, decl ast.Decl, id *ast.Ident) *Snippet + func (p *Presentation) PkgFSRoot() string + func (p *Presentation) SearchResultCode(result SearchResult) []byte + func (p *Presentation) SearchResultDoc(result SearchResult) []byte + func (p *Presentation) SearchResultTxt(result SearchResult) []byte + func (p *Presentation) ServeError(w http.ResponseWriter, r *http.Request, relpath string, err error) + func (p *Presentation) ServeFile(w http.ResponseWriter, r *http.Request) + func (p *Presentation) ServeHTMLDoc(w http.ResponseWriter, r *http.Request, abspath, relpath string) + func (p *Presentation) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (p *Presentation) ServePage(w http.ResponseWriter, page Page) + func (p *Presentation) ServeText(w http.ResponseWriter, text []byte) + func (p *Presentation) TemplateFuncs() template.FuncMap + func (p *Presentation) WriteNode(w io.Writer, fset *token.FileSet, x interface{}) + type RunList []interface + type SearchResult struct + Alert string + Alt *AltWords + Complete bool + Found int + Hit *LookupResult + Idents map[SpotKind][]Ident + Pak HitList + Query string + Textual []FileLines + type SearchResultFunc func(p *Presentation, result SearchResult) []byte + type Segment struct + type SegmentWriter func(w io.Writer, text []byte, selections int) + type Selection func() Segment + func RangeSelection(str string) Selection + type Snippet struct + Line int + Text string + func NewSnippet(fset *token.FileSet, decl ast.Decl, id *ast.Ident) *Snippet + type Spot struct + File *File + Info SpotInfo + type SpotInfo uint32 + func (x SpotInfo) IsIndex() bool + func (x SpotInfo) Kind() SpotKind + func (x SpotInfo) Lori() int + type SpotKind uint32 + const ConstDecl + const FuncDecl + const ImportDecl + const MethodDecl + const PackageClause + const TypeDecl + const Use + const VarDecl + func (x SpotKind) Name() string + type Statistics struct + Bytes int + Files int + Lines int + Spots int + Words int