pkg

package
v0.0.0-...-dc5dc8e Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pkg

type Pkg struct {
	Name string
	// contains filtered or unexported fields
}

func New

func New(name string) *Pkg

func (*Pkg) AddFile

func (p *Pkg) AddFile(files ...*file.File)

func (*Pkg) GetDefaultImported

func (p *Pkg) GetDefaultImported(path, value string) (string, error)

func (*Pkg) GetFunc

func (p *Pkg) GetFunc(name string) map[*file.File]*dst.FuncDecl

Func search function by name

func (*Pkg) GetFuncResultByName

func (p *Pkg) GetFuncResultByName(FnName, recvName string) []string

func (*Pkg) GetFuncWithParam

func (p *Pkg) GetFuncWithParam(param string) map[*file.File][]*dst.FuncDecl

func (*Pkg) GetFuncWithSelector

func (p *Pkg) GetFuncWithSelector(expr string) map[*file.File][]*dst.FuncDecl

func (*Pkg) GetGlobalVar

func (p *Pkg) GetGlobalVar() map[string]string

func (*Pkg) GetImported

func (p *Pkg) GetImported(path string) (string, error)

func (*Pkg) GetStruct

func (p *Pkg) GetStruct(name string) (*dst.StructType, error)

func (*Pkg) GetStructFieldType

func (p *Pkg) GetStructFieldType(structName, fieldName string) (string, bool)

func (*Pkg) Save

func (p *Pkg) Save() error

Save save file

Jump to

Keyboard shortcuts

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