magelib

package module
v0.0.0-...-5971fce Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: MIT Imports: 17 Imported by: 0

README

magelib

Mage library

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProjectPkg = func() string {
		result, err := exec.Command("go", "list", ".").Output()
		if err != nil {
			panic(err)
		}
		return strings.TrimSpace(string(result))
	}()
	ProjectDir = func() string {
		result, err := os.Getwd()
		if err != nil {
			panic(errors.Wrap(err, "We can't specify cwd!"))
		}
		return result
	}()
)

Project settings

Functions

func Build

func Build(binaryName string, kinds []*BuildPair) error

Build ... Build binary for project

func Fmt

func Fmt(noFormatPatterns []string) error

Fmt ... Format codes in project.

func Godoc

func Godoc() error

Godoc ... Run godoc server.

func Info

func Info(msg ...interface{})

Info ... Print informations to stderr

func Lint

func Lint() error

Lint ... Lint codes in project.

func Test

func Test(noTestPackages []string) error

Test ... Execute tests

func Warn

func Warn(msg ...interface{})

Warn ... Print warnings to stderr

Types

type BuildPair

type BuildPair struct {
	Os   string
	Arch string
}

func NewBuildPair

func NewBuildPair(os string, arch string) *BuildPair

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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