parse

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 14 Imported by: 11

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
	Receiver  string
	IsError   bool
	IsContext bool
	Synopsis  string
	Comment   string
}

Function represented a job function from a mage file

func (Function) TemplateName added in v1.2.4

func (f Function) TemplateName() string

TemplateName returns the invocation name, supporting namespaced functions.

func (Function) TemplateString added in v1.2.4

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 {
	Description      string
	Funcs            []Function
	DefaultIsError   bool
	DefaultIsContext bool
	DefaultName      string
	DefaultFunc      Function
	Aliases          map[string]string
}

PkgInfo contains inforamtion about a package of files according to mage's parsing rules.

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