Documentation ¶
Overview ¶
Package genutil is a utility package for query helpers codegeneration.
Index ¶
- func Implementations(pkg *packages.Package, iface *types.Interface) []*types.Named
- func Load(ctx context.Context, pattern string) (*packages.Package, error)
- func PrintType(typ types.Type) string
- func WriteTemplate(source fs.FS, out io.Writer, name string, data interface{}) error
- type Func
- type Interfaces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Implementations ¶
Implementations finds iface implementations.
Types ¶
type Func ¶
Func is a function representation.
type Interfaces ¶
type Interfaces struct {
// contains filtered or unexported fields
}
Interfaces is a simple utility struct to find interfaces and implementations.
func NewInterfaces ¶
func NewInterfaces(pkg *packages.Package) *Interfaces
NewInterfaces creates new Interfaces structure.
func (*Interfaces) Implementations ¶
func (c *Interfaces) Implementations(name string) ([]*types.Named, error)
Implementations finds interface implementations by interface name.
Click to show internal directories.
Click to hide internal directories.