goproxy

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessDashC

func ProcessDashC(args []string) ([]string, error)

ProcessDashC gets the command line arguments passed to a "go" command (without "go" itself), and processes the "-C" flag present at the beginning of the slice (if present), changing directories as requested, then returns the slice without it.

The "-C" flags is reuqired to be the very first argument provided to "go" commands.

func Run

func Run(goArgs []string, opts ...Option) error

Run takes a go command ("build", "install", etc...) with its arguments, and applies changes specified through opts to the command before running it in a different process.

Types

type Option

type Option func(*config)

func WithToolexec

func WithToolexec(bin string, args ...string) Option

WithToolexec forces a call to Run() to build with the -toolexec option when wrapping a build command

Jump to

Keyboard shortcuts

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