realityvorti.blogg.se

Godocs golang
Godocs golang













  1. GODOCS GOLANG INSTALL
  2. GODOCS GOLANG CODE

  • func (p *Presentation) SearchResultCode(result SearchResult) byte.
  • func (p *Presentation) PkgFSRoot() string.
  • func (p *Presentation) NewSnippet(fset *token.FileSet, decl ast.Decl, id *ast.Ident) *Snippet.
  • func (p *Presentation) HandleSearch(w http.ResponseWriter, r *http.Request).
  • godocs golang

  • func (p *Presentation) GetPkgPageInfo(abspath, relpath string, mode PageInfoMode) *PageInfo.
  • func (p *Presentation) GetPageInfoMode(r *http.Request) PageInfoMode.
  • func (p *Presentation) GetCmdPageInfo(abspath, relpath string, mode PageInfoMode) *PageInfo.
  • func (p *Presentation) FuncMap() template.FuncMap.
  • func (p *Presentation) FileServer() http.Handler.
  • func (p *Presentation) CmdFSRoot() string.
  • func NewPresentation(c *Corpus) *Presentation.
  • func (x *Indexer) Visit(node ast.Node) ast.Visitor.
  • func (x *Index) WriteTo(w io.Writer) (n int64, err error).
  • func (x *Index) Snippet(i int) *Snippet.
  • func (x *Index) ReadFrom(r io.Reader) (n int64, err error).
  • func (x *Index) PackagePath() mapmapbool.
  • func (x *Index) LookupRegexp(r *regexp.Regexp, n int) (found int, result FileLines).
  • func (x *Index) Lookup(query string) (*SearchResult, error).
  • func (x *Index) Exports() mapmapSpotKind.
  • func (x *Index) CompatibleWith(c *Corpus) bool.
  • func (c *Corpus) ReadIndexFrom(r io.Reader) error.
  • func (c *Corpus) MetadataFor(relpath string) *Metadata.
  • func (c *Corpus) Lookup(query string) SearchResult.
  • func (c *Corpus) FSModifiedTime() time.Time.
  • func (c *Corpus) CurrentIndex() (*Index, time.Time).
  • func NewCorpus(fs vfs.FileSystem) *Corpus.
  • func LinkifyText(w io.Writer, text byte, n ast.Node).
  • func FormatText(w io.Writer, text byte, line int, goSource bool, pattern string.
  • func FormatSelections(w io.Writer, text byte, lw LinkWriter, links Selection, sw SegmentWriter.
  • This package comment will evolve over time as this package splits Package godoc is a work-in-progress () package toīegin splitting up the godoc binary into multiple pieces. To disable your browser's cache to avoid reloading a stale file. Run godoc -http=:6060 and view your changes in the browser.

    godocs golang

    GODOCS GOLANG INSTALL

    Run go install /x/tools/cmd/godoc so the compiled godoc binary Run go generate /x/tools/godoc/static so static/static.go picks So to compile a change and test it in your browser:

    godocs golang

    They are placed into static/static.go by running The files that live at static/style.css, static/jquery.js and so on are not It can be tedious to recompile assets every time, but you can pass aįlag to load CSS/JS/templates from disk every time a page loads: godoc -templates=$GOPATH/src//x/tools/godoc/static -http=:6060 In production, CSS/JS/template assets need to be compiled into the godocīinary. TheĮxecutable lives at /x/tools/cmd/godoc.

    GODOCS GOLANG CODE

    This directory contains most of the code for running a godoc server. (p) GetPkgPageInfo(abspath, relpath, mode) (p) GetCmdPageInfo(abspath, relpath, mode) FormatSelections(w, text, lw, links, sw, selections)įormatText(w, text, line, goSource, pattern, selection)















    Godocs golang