golang

package
v0.0.0-...-7d312d8 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Go

func Go(ctx context.Context, cwd string, args ...string) (string, error)

Go runs the given Go command in the given working directory.

func Info

func Info(ctx context.Context) (string, string, error)

Info executes commands to find the path to the Go executable and its version.

func Install

func Install(ctx context.Context, cwd string, args ...string) error

Install runs "go install" with the given args.

func InstallCommonDeps

func InstallCommonDeps(ctx context.Context, workdir string) error

InstallCommonDeps installs common dependencies needed by the infra tests in this repo. Tries up to three times per dependency in case of transient network issues.

func ModDownload

func ModDownload(ctx context.Context, cwd string) error

ModDownload downloads the Go module dependencies of the module in cwd. Tries up to three times in case of transient network issues.

func Test

func Test(ctx context.Context, cwd string, args ...string) error

Test runs "go test", parses the output, and creates sub-steps for individual tests.

func WithEnv

func WithEnv(ctx context.Context, workdir string) context.Context

WithEnv sets the Go environment to be based in the given workdir. Calls to all other functions in this package should use the returned Context, or a descendant of it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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