mageplus

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Wrapper mage.Command = 1000
)

Variables

View Source
var (
	DotEnvFilesCandidates = []string{".env.mage", ".env.build", ".env", ".env.example"}
)

Functions

func EnsureSdkIfRequired

func EnsureSdkIfRequired(inv Invocation) error

func Main

func Main() int

Main is the entrypoint for running mage. It exists external to mage's main function to allow it to be used from other programs, specifically so you can go run a simple file that run's mage's Main.

func ParseAndRun

func ParseAndRun(stdout, stderr io.Writer, stdin io.Reader, args []string) int

ParseAndRun parses the command line, and then compiles and runs the mage files in the given directory with the given args (do not include the command name in the args).

Types

type Invocation

type Invocation struct {
	mage.Invocation
	EnsureSdk bool // If true SDK will be ensured and on demand downloaded
}

func Parse

func Parse(stderr, stdout io.Writer, args []string) (inv Invocation, cmd mage.Command, err error)

Parse parses the given args and returns structured data. If parse returns flag.ErrHelp, the calling process should exit with code 0.

Jump to

Keyboard shortcuts

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