doc

package
v0.0.0-...-310ba95 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

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

Getter is a wrapper around the gogetdoc command

func ObtainGetter

func ObtainGetter(env gomate.Env) (Getter, error)

ObtainGetter will attempt to return a reference to the environment doc getter.

func (Getter) LookupSymbol

func (g Getter) LookupSymbol(ctx context.Context, c gomate.Cursor) (Symbol, error)

LookupSymbol attempts to look up a symbol's doc via file and offset

type Position

type Position struct {
	AbsPath string
	Line    uint
	Column  uint
}

Position points to where this symbol is

func (*Position) UnmarshalJSON

func (p *Position) UnmarshalJSON(data []byte) error

UnmarshalJSON conforms to json.Unmarshaler

type Symbol

type Symbol struct {
	Name   string   `json:"name"`
	Import string   `json:"import"`
	Pkg    string   `json:"pkg"`
	Decl   string   `json:"decl"`
	Doc    string   `json:"doc"`
	Pos    Position `json:"pos"`
}

Symbol represents documentation about a Go source code symbol

func (Symbol) CodeRef

func (s Symbol) CodeRef(baseDir string) gomate.CodeRef

CodeRef returns a code reference relative to the specified baseDir

func (Symbol) HTML

func (s Symbol) HTML() string

HTML returns an HTML string representation of the doc string

Jump to

Keyboard shortcuts

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