target

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package target exposes Go targets that can be imported in magefile using import syntax. When using this package the user has to set target.BuildTarget. For more low level usage the golang package should be preferred.

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildTarget = ""
	BuildMatrix = golang.DefaultBuildMatrix
	RunArgs     = []string{}
	RunEnvs     = map[string]string{}
)

Functions

This section is empty.

Types

type Go

type Go mg.Namespace

func (Go) Build

func (Go) Build(ctx context.Context) error

Build build binary and calculate sha sum for it

func (Go) CoverProfile

func (Go) CoverProfile(ctx context.Context) error

CoverProfile convert binary coverage into text format

func (Go) CrossBuild

func (Go) CrossBuild(ctx context.Context) error

CrossBuild build binary for build matrix

func (Go) E2eBuild added in v1.4.4

func (Go) E2eBuild(ctx context.Context) error

E2eBuild build binary with coverage collections

func (Go) IntegrationTest

func (Go) IntegrationTest(ctx context.Context) error

IntegrationTest run integration tests

func (Go) Run

func (Go) Run(ctx context.Context) error

Run build binary and execute it

func (Go) Test

func (Go) Test(ctx context.Context)

Test run unit and integration tests

func (Go) TestAndCover added in v1.5.3

func (Go) TestAndCover(ctx context.Context)

TestAndCover run all tests and open coverage in browser

func (Go) TestBuild added in v1.4.3

func (Go) TestBuild(ctx context.Context) error

TestBuild build binary with race detection and coverage collections

func (Go) Tidy

func (Go) Tidy(ctx context.Context) error

Tidy run go mod tidy

func (Go) TidyAndVerify

func (Go) TidyAndVerify(ctx context.Context) error

TidyAndVerify verify that go.mod matches imports

func (Go) UnitTest

func (Go) UnitTest(ctx context.Context) error

UnitTest run all unit tests

func (Go) ViewCoverage

func (Go) ViewCoverage(ctx context.Context) error

ViewCoverage open test coverage in browser

Jump to

Keyboard shortcuts

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