parse

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2017 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 Function

type Function struct {
	Name      string
	IsError   bool
	IsContext bool
	Synopsis  string
	Comment   string
}

Function represented a job function from a mage file

func (Function) TemplateString

func (f Function) TemplateString() string

TemplateString returns code for the template switch to run the target. It wraps each target call to match the func(context.Context) error that runTarget requires.

type PkgInfo

type PkgInfo struct {
	Funcs            []Function
	DefaultIsError   bool
	DefaultIsContext bool
	DefaultName      string
	DefaultFunc      Function
}

func Package

func Package(path string, files []string) (*PkgInfo, error)

Package parses a package

Jump to

Keyboard shortcuts

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