internal

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Packages

func Packages(loaded []*packages.Package) map[string]*Package

Packages returns the internal representation of the loaded packages.

Types

type Basic

type Basic struct {
	DocType *doc.Type
	Named   *types.Named
	Basic   *types.Basic
}

Basic represents a basic type.

type Package

type Package struct {
	Pkg     *packages.Package
	AstPkg  *ast.Package
	DocPkg  *doc.Package
	Basics  map[string]*Basic
	Structs map[string]*Struct
}

Package represents a package.

func LoadPackage

func LoadPackage(path string, fset *token.FileSet) (*Package, map[string]*Package, error)

LoadPackage loads the package with the given path and all of its dependencies.

type Struct

type Struct struct {
	DocType   *doc.Type
	Named     *types.Named
	Struct    *types.Struct
	AstStruct *ast.StructType
}

Struct represents a struct type.

func (*Struct) AstField

func (x *Struct) AstField(name string) *ast.Field

AstField returns the named ast.Field if it exists.

func (*Struct) FieldDoc

func (x *Struct) FieldDoc(name string) *ast.CommentGroup

FieldDoc returns the named field's doc if it exists.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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