arguments

package
v6.0.0-...-ef08a44 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 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 Evaler

type Evaler func(string) (string, error)

type ParsedArguments

type ParsedArguments struct {
	GenerateInterfaceAndShimFromPackageDirectory bool

	SourcePackageDir string // abs path to the dir containing the interface to fake
	PackagePath      string // package path to the package containing the interface to fake
	OutputPath       string // path to write the fake file to

	DestinationPackageName string // often the base-dir for OutputPath but must be a valid package name

	InterfaceName string // the interface to counterfeit
	FakeImplName  string // the name of the struct implementing the given interface

	IsGeneric   bool   // is it a generic interface?
	GenericType string // if it is a generic interface, this will be the generic type

	PrintToStdOut bool
	GenerateMode  bool
	Quiet         bool

	HeaderFile string
}

func New

func New(args []string, workingDir string, evaler Evaler, stater Stater) (*ParsedArguments, error)

func (*ParsedArguments) PrettyPrint

func (a *ParsedArguments) PrettyPrint()

type Stater

type Stater func(string) (os.FileInfo, error)

Jump to

Keyboard shortcuts

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