Documentation ¶
Index ¶
- func ConstId(name string) string
- func FormatComments(text string) string
- func FormatNode(fset *token.FileSet, node interface{}) (string, error)
- func FuncId(name string) string
- func FuncReceiver(fn *ast.FuncDecl) string
- func MethodId(typ string, name string) string
- func SetEnvironment(s kvs.Storage, env *Environment)
- func TypeId(name string) string
- func VarId(name string) string
- type Environment
- func (e Environment) Base(p string) string
- func (e Environment) Dir(p string) string
- func (e Environment) FromSlash(p string) string
- func (e Environment) ImportPackage(p string) (*Package, error)
- func (e Environment) ImportPackageOpts(p string, opts *ImportOptions) (*Package, error)
- func (e Environment) ImportPackages(dir string) ([]*Package, error)
- func (e Environment) IsAbs(p string) bool
- func (e Environment) IsDir(p string) bool
- func (e Environment) Join(elem ...string) string
- func (e Environment) OpenFile(path string) (io.ReadCloser, error)
- func (e Environment) ReadDir(p string) ([]os.FileInfo, error)
- type Example
- type ImportOptions
- type Kind
- type Package
- func (p *Package) CommandName() string
- func (p *Package) Dir() string
- func (p *Package) Doc() *doc.Package
- func (p *Package) Examples() []*Example
- func (p *Package) File(name string) *ast.File
- func (p *Package) FileSet() *token.FileSet
- func (p *Package) Filenames() []string
- func (p *Package) FuncExamples(fn *doc.Func) []*Example
- func (p *Package) FuncLink(fn *ast.FuncDecl) string
- func (p *Package) Funcs() []*doc.Func
- func (p *Package) GoFilenames() []string
- func (p *Package) HTML(text string) template.HTML
- func (p *Package) HTMLDecl(node interface{}) (template.HTML, error)
- func (p *Package) HTMLDoc() template.HTML
- func (p *Package) HasDoc() bool
- func (p *Package) ImportPath() string
- func (p *Package) Imports() []string
- func (p *Package) IsEmpty() bool
- func (p *Package) IsMain() bool
- func (p *Package) IsStd() bool
- func (p *Package) LineCount() (int, error)
- func (p *Package) LinkType(x string, sel string) string
- func (p *Package) Linkify(comment string, group *ast.CommentGroup) string
- func (p *Package) Name() string
- func (p *Package) NewAST() (*token.FileSet, *ast.Package, error)
- func (p *Package) NonStdImports() []string
- func (p *Package) ReverseFilename(filename string) string
- func (p *Package) ReverseFilenameLine(filename string, line int) string
- func (p *Package) ReversePos(n ast.Node) string
- func (p *Package) ReversePosition(pos token.Position) string
- func (p *Package) ScopedHTML(text string, scope interface{}) template.HTML
- func (p *Package) Stats() (*Stats, error)
- func (p *Package) Synopsis() string
- type Stats
- type Undocumented
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatComments ¶
func FuncReceiver ¶
func SetEnvironment ¶
func SetEnvironment(s kvs.Storage, env *Environment)
Types ¶
type Environment ¶
type Environment struct { kvs.KVS Context build.Context Separator string // contains filtered or unexported fields }
func GetEnvironment ¶
func GetEnvironment(s kvs.Storage) *Environment
func NewEnvironment ¶
func NewEnvironment(reverseDoc, reverseSource func(string) string) *Environment
func (Environment) Base ¶
func (e Environment) Base(p string) string
func (Environment) Dir ¶
func (e Environment) Dir(p string) string
func (Environment) FromSlash ¶
func (e Environment) FromSlash(p string) string
func (Environment) ImportPackage ¶
func (e Environment) ImportPackage(p string) (*Package, error)
func (Environment) ImportPackageOpts ¶
func (e Environment) ImportPackageOpts(p string, opts *ImportOptions) (*Package, error)
func (Environment) ImportPackages ¶
func (e Environment) ImportPackages(dir string) ([]*Package, error)
func (Environment) IsAbs ¶
func (e Environment) IsAbs(p string) bool
func (Environment) IsDir ¶
func (e Environment) IsDir(p string) bool
func (Environment) Join ¶
func (e Environment) Join(elem ...string) string
func (Environment) OpenFile ¶
func (e Environment) OpenFile(path string) (io.ReadCloser, error)
type Example ¶
type Example struct {
// contains filtered or unexported fields
}
func (*Example) EmptyOutput ¶
type ImportOptions ¶
type ImportOptions struct {
Shallow bool
}
type Package ¶
type Package struct { Packages []*Package // contains filtered or unexported fields }
func (*Package) CommandName ¶
func (*Package) GoFilenames ¶
func (*Package) ImportPath ¶
func (*Package) NonStdImports ¶
func (*Package) ReverseFilename ¶
func (*Package) ReverseFilenameLine ¶
func (*Package) ScopedHTML ¶
type Stats ¶
type Stats struct { Documented int ToDocument int // Indicates if the package has documentation. HasDoc bool Undocumented []*Undocumented // contains filtered or unexported fields }
func (*Stats) DocPenalty ¶
func (*Stats) DocumentedIncrease ¶
func (*Stats) DocumentedPercentage ¶
func (*Stats) NoDocPenalty ¶
type Undocumented ¶
func (*Undocumented) Id ¶
func (u *Undocumented) Id() string
func (*Undocumented) String ¶
func (u *Undocumented) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.