packageloader

package
v0.0.0-...-5eebe45 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLoader

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

func NewFileLoader

func NewFileLoader(
	path string,
	log logr.Logger,
	typeFilters *typefilter.TypeFilterList,
) *FileLoader

func (*FileLoader) Declarations

func (loader *FileLoader) Declarations() []model.Declaration

func (*FileLoader) Group

func (loader *FileLoader) Group() (string, bool)

Group returns the group of the file, if known.

func (*FileLoader) Load

func (loader *FileLoader) Load() error

func (*FileLoader) Version

func (loader *FileLoader) Version() (string, bool)

Version returns the version of the file, if known.

type PackageLoader

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

func New

func New(
	cfg *config.Config,
	log logr.Logger,
) *PackageLoader

func (*PackageLoader) LoadDirectory

func (loader *PackageLoader) LoadDirectory(folder string) (*model.Package, error)

LoadDirectory scans a directory for Go files and loads them into a Package. folder is the full path to the directory to load.

func (*PackageLoader) LoadFile

func (loader *PackageLoader) LoadFile(file string) (*model.Package, error)

LoadFile loads a single Go file into a Package. file is the full path to the file to load.

Jump to

Keyboard shortcuts

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