types

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 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 Interface

type Interface struct {
	Name       string
	ImportPath string
	TypeParams []TypeParam
	Methods    []*Method

	// Prefix is set on extraction based on the current PackageOptions
	Prefix string
}

func Extract

func Extract(pkgs []*packages.Package, packageOptions []PackageOptions) (ifaces []*Interface, _ error)

type Method

type Method struct {
	Name     string
	Params   []types.Type
	Results  []types.Type
	Variadic bool
}

type PackageOptions

type PackageOptions struct {
	ImportPaths []string
	Interfaces  []string
	Exclude     []string
	Prefix      string
}

type TypeParam

type TypeParam struct {
	Name string
	Type types.Type
}

Jump to

Keyboard shortcuts

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