arguments

package
Version: v0.0.0-...-590a33f Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgumentParser

type ArgumentParser interface {
	ParseArguments(...string) ParsedArguments
}

func NewArgumentParser

func NewArgumentParser(
	failHandler FailHandler,
	currentWorkingDir CurrentWorkingDir,
	symlinkEvaler SymlinkEvaler,
	fileStatReader FileStatReader,
	ui terminal.UI,
) ArgumentParser

type CurrentWorkingDir

type CurrentWorkingDir func() string

type FailHandler

type FailHandler func(string, ...interface{})

type FileStatReader

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

type ParsedArguments

type ParsedArguments struct {
	GenerateInterfaceAndShimFromPackageDirectory bool

	SourcePackageDir string // abs path to the dir containing the interface to fake
	ImportPath       string // import 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
	ExplicitPackageName    bool   // package name was specified by user

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

	PrintToStdOut bool
}

type SymlinkEvaler

type SymlinkEvaler func(string) (string, error)

Jump to

Keyboard shortcuts

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