Version: v0.84.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2021 License: Apache-2.0, BSD-3-Clause Imports: 10 Imported by: 0



Package pkgsite is not for external use. May change at any time without warning.

Copied from and



This section is empty.


This section is empty.


func PrintType

func PrintType(fset *token.FileSet, decl ast.Decl, toURL func(string, string) string, topLevelDecls map[interface{}]bool) string

PrintType returns a string representation of the decl.

PrintType works by:

1. Generate a map from every identifier to a URL for the identifier (or no
   URL if the identifier shouldn't link).
2. ast.Inspect the decl to get an ordered slice of every identifier to the
   link for it, using the map from step 1.
3. Print out the plain doc for the decl.
4. Use scanner.Scanner to find every identifier (in the same order as step
   2). If there is a link for the identifier, insert it. Otherwise, print
   the plain doc.

func Synopsis

func Synopsis(fset *token.FileSet, n ast.Node, linkify func(string) string) string

Synopsis returns a one-line summary of the given input node.

func TopLevelDecls

func TopLevelDecls(pkg *doc.Package) map[interface{}]bool

TopLevelDecls returns the top level declarations in the package.


This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to