magetools

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDirtyRepo = errors.New("encountered dirty repo")

Functions

func GetCommit

func GetCommit() (string, error)

func GetVersion

func GetVersion() (string, error)

func IsGitClean

func IsGitClean() error

Types

type Go

type Go struct {
	Arch       string
	OS         string
	Version    string
	Commit     string
	CGoEnabled string
	Verbose    string
}

func NewGo

func NewGo(arch, goos, version, commit string, cgoEnabled, verbose bool) *Go

func (*Go) Build

func (g *Go) Build() error

func (*Go) Fmt

func (g *Go) Fmt(target string) error

func (*Go) Lint

func (g *Go) Lint(targets ...string) error

func (*Go) Mod

func (g *Go) Mod() *Mod

func (*Go) Test

func (g *Go) Test(coverpkg string, targets ...string) error

type Mod

type Mod struct {
	*Go
}

func (*Mod) Download

func (m *Mod) Download() error

func (*Mod) Tidy

func (m *Mod) Tidy() error

func (*Mod) Verify

func (m *Mod) Verify() error

Jump to

Keyboard shortcuts

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