interfacify

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(cfg Config) ([]byte, error)

Generate loads the requested types and renders the output file.

func Run

func Run(cfg Config) error

Run generates interfaces and writes the result to disk.

Types

type Config

type Config struct {
	// PathsList is a comma-separated list of module or workspace directories to search.
	// The first matching path wins for each requested import path.
	PathsList string
	// StructsList contains the fully-qualified target type names.
	StructsList string
	// OutputFile is where the generated code is written.
	OutputFile string
	// OutputPkg is the package name used in the generated file.
	OutputPkg string
	// IncludeEmbedded controls whether embedded methods are included.
	IncludeEmbedded bool
	// Prefix specify generated interfaces prefix
	Prefix string
	// Suffix specify generated interfaces suffix
	Suffix string
}

Config stores the CLI options used to generate interfaces.

Jump to

Keyboard shortcuts

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