file

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

File file

func New

func New(src string) (*File, error)

New file. src : path of go file or source

func (*File) DefaultImport

func (f *File) DefaultImport(path string, value string) (string, bool)

func (*File) Dirty

func (f *File) Dirty()

func (*File) Func

func (f *File) Func(name string) (*dst.FuncDecl, error)

Func search function with name

func (*File) FuncWithParam

func (f *File) FuncWithParam(param string) (fds []*dst.FuncDecl)

FuncWithParam search functions with param

func (*File) FuncWithRecv

func (f *File) FuncWithRecv(fnName, recvName string) (*dst.FuncDecl, error)

func (*File) FuncWithSelector

func (f *File) FuncWithSelector(expr string) (fds []*dst.FuncDecl)

FuncWithSelector search functions that contain this expr

func (*File) GlobalVars

func (f *File) GlobalVars() map[string]string

GlobalVars global vars in file

func (*File) Imported

func (f *File) Imported(path string) (string, bool)

func (*File) Pkg

func (f *File) Pkg() string

Pkg package name

func (*File) Save

func (f *File) Save() error

Save file

func (*File) Struct

func (f *File) Struct(name string) (*dst.StructType, error)

Jump to

Keyboard shortcuts

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