Documentation ¶
Index ¶
- Variables
- type Executor
- func (e *Executor) Build(filename, name string, parts ...string)
- func (e *Executor) BuildE(filename, name string, parts ...string) error
- func (e *Executor) Dir(name string, parts ...string) string
- func (e *Executor) DirE(name string, parts ...string) (string, error)
- func (e *Executor) Get(name string) *Module
- func (e *Executor) GetE(name string) (*Module, error)
- func (e *Executor) List() []Module
- func (e *Executor) ListE() ([]Module, error)
- type ExecutorOptions
- type Module
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultExecutor is the default executor. DefaultExecutor = &Executor{} // ListE is an alias to DefaultExecutor.ListE. ListE = DefaultExecutor.ListE // List is an alias to DefaultExecutor.List. List = DefaultExecutor.List // GetE is an alias to DefaultExecutor.GetE. GetE = DefaultExecutor.GetE // Get is an alias to DefaultExecutor.Get. Get = DefaultExecutor.Get // DirE is an alias to DefaultExecutor.DirE. DirE = DefaultExecutor.DirE // Dir is an alias to DefaultExecutor.Dir. Dir = DefaultExecutor.Dir // BuildE is an alias to DefaultExecutor.BuildE. BuildE = DefaultExecutor.BuildE // Build is an alias to DefaultExecutor.Build. Build = DefaultExecutor.Build )
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is an executor for go.mod-related operations.
func NewExecutor ¶
func NewExecutor(opts ExecutorOptions) *Executor
NewExecutor creates a new Executor with the given ExecutorOptions.
func (*Executor) Build ¶
Build builds the specified module to the target filename, optionally taking sub-paths in the target module. It panics if an error occurs.
func (*Executor) BuildE ¶
BuildE builds the specified module to the target filename, optionally taking sub-paths in the target module.
func (*Executor) Dir ¶
Dir gets the on-disk location of the specified module, optionally joining the parts to the directory. It panics if an error occurs.
func (*Executor) DirE ¶
DirE gets the on-disk location of the specified module, optionally joining the parts to the directory.
type ExecutorOptions ¶
type ExecutorOptions struct { // Dir is the working directory the executor runs in. Dir string }
ExecutorOptions are options to create an executor with.