finddoc

package
v0.0.0-...-b76ad68 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2015 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Doc is a simple document printer that produces the doc comments for its argument symbols, plus a link to the full documentation and a pointer to the source. It has a more Go-like UI than godoc. It can also search for symbols by looking in all packages, and case is ignored. For instance:

doc isupper

will find unicode.IsUpper.

The -pkg flag retrieves package-level doc comments only.

Usage:

doc pkg.name   # "doc io.Writer"
doc pkg name   # "doc fmt Printf"
doc name       # "doc isupper" (finds unicode.IsUpper)
doc -pkg pkg   # "doc fmt"

The pkg is the last element of the package path; no slashes (ast.Node not go/ast.Node).

Flags

-c(onst) -f(unc) -i(nterface) -m(ethod) -s(truct) -t(ype) -v(ar)

restrict hits to declarations of the corresponding kind. Flags

-doc -src -url

restrict printing to the documentation, source path, or godoc URL.

Index

Constants

This section is empty.

Variables

View Source
var Command = &command.Command{
	Run:       runDoc,
	UsageLine: "finddoc [pkg.name|pkg name|-pkg name]",
	Short:     "golang doc lookup",
	Long:      usageDoc,
}

Functions

func Paths

func Paths(pkg string) []string

func SplitGopath

func SplitGopath() []string

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File is a wrapper for the state of a file used in the parser. The parse tree walkers are all methods of this type.

func (*File) Visit

func (f *File) Visit(node ast.Node) ast.Visitor

Visit implements the ast.Visitor interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL