Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWrapper ¶
type FileWrapper struct {
// contains filtered or unexported fields
}
FileWrapper is a wrapper around the ast.File struct that provides convenience methods.
func WrapFile ¶
func WrapFile(file *ast.File) *FileWrapper
WrapFile creates a new FileWrapper instance based on an ast.File struct.
func (*FileWrapper) FindPackagePathByName ¶
func (w *FileWrapper) FindPackagePathByName(name string) (string, error)
FindPackagePathByName searches the file's import statements for a package with the specified name and returns its path.
func (*FileWrapper) Imports ¶
func (w *FileWrapper) Imports() []*importWrapper
Imports returns a slice of importWrapper instances representing the file's import statements.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner is a struct that contains a fileset and is used to scan directories for Go files.
func NewScanner ¶
NewScanner creates a new instance of Scanner.
Click to show internal directories.
Click to hide internal directories.