internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	common.Logging

	Path string
}

Executor is used to execute the subcommands

func NewExecutor

func NewExecutor(path string) Executor

NewExecutor returns a new Executor instance

The path to the project is changed to the absolute path is it exists

func (Executor) DoBuild

func (executor Executor) DoBuild(outputPath string, goos string, goarch string, verbose bool) int

DoBuild performs a build of the project

func (Executor) DoClean

func (executor Executor) DoClean() int

DoClean performs a clean of the project

func (Executor) DoDebug

func (executor Executor) DoDebug(args []string) int

DoDebug debugs the project and passes the arguments to the command

func (Executor) DoInit

func (executor Executor) DoInit() int

DoInit initializes a project in an existing directory

func (Executor) DoInstall

func (executor Executor) DoInstall(verbose bool) int

DoInstall builds the executable and installs it in $GOPATH/bin

func (Executor) DoNew

func (executor Executor) DoNew(path string, packageName string, name string, description string) int

DoNew initializes a project in an existing directory

func (Executor) DoPackage

func (executor Executor) DoPackage(verbose bool, concurrency int) int

DoPackage performs a package of the project

func (Executor) DoRun

func (executor Executor) DoRun(args []string) int

DoRun runs the project and passes the arguments to the command

func (Executor) DoTest

func (executor Executor) DoTest() int

DoTest performs the tests defined in the project

func (Executor) DoUninstall

func (executor Executor) DoUninstall() int

DoUninstall removes the executable from $GOPATH/bin

type Subcommand

type Subcommand interface {
	Execute(project common.Project, cfg config.Config) error // Execute executes the subcommand with the given project and config
	RequiresBuild() bool                                     // Return true if a build is required before running the command
}

Subcommand defines the interface a subcommand need to implement

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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