source

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoader

func NewLoader(c *Config) (*loader, error)

Types

type Config

type Config struct {
	LoadFunc func(patterns ...string) ([]*Package, error)
	Logf     func(format string, args ...any)
}

type Definition

type Definition struct {
	Dec     ast.Decl
	PkgName string
	PkgPath string
}

type Loader

type Loader interface {
	Load(c context.Context, defs []*config.TypeDefinition) (code.SourceList, error)
}

type Package

type Package struct {
	Name  string
	Path  string
	Files []*ast.File
}

func LoadFromPackage

func LoadFromPackage(paths ...string) ([]*Package, error)

type PkgPath

type PkgPath = string

Jump to

Keyboard shortcuts

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