gocmd

package
v1.2.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(arg string, conf *BuildConfig) (err error)

func BuildFiles

func BuildFiles(files []string, conf *BuildConfig) (err error)

func Install

func Install(arg string, conf *InstallConfig) (err error)

func InstallFiles

func InstallFiles(files []string, conf *InstallConfig) (err error)

func Name added in v1.1.12

func Name() string

Name returns name of the go command. It returns value of environment variable `GOP_GOCMD` if not empty. If not found, it returns `go`.

func RunDir

func RunDir(buildDir, dir string, args []string, conf *RunConfig) (err error)

RunDir runs a Go project by specified directory. If buildDir is not empty, it means split `go run` into `go build` in buildDir and run the built app in current directory.

func RunFiles

func RunFiles(buildDir string, files []string, args []string, conf *RunConfig) (err error)

RunFiles runs a Go project by specified files. If buildDir is not empty, it means split `go run` into `go build` in buildDir and run the built app in current directory.

func Test

func Test(arg string, conf *TestConfig) (err error)

func TestFiles

func TestFiles(files []string, conf *TestConfig) (err error)

Types

type BuildConfig

type BuildConfig = Config

type Config

type Config struct {
	Gop   *GopEnv
	GoCmd string
	Flags []string
	Run   func(cmd *exec.Cmd) error
}

type GopEnv

type GopEnv = env.Gop

type InstallConfig

type InstallConfig = Config

type RunConfig

type RunConfig = Config

type TestConfig

type TestConfig = Config

Jump to

Keyboard shortcuts

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