exec

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoBuild

func GoBuild(dir string, cgo bool, goos string, goarch string, output string) error

GoBuild 编译go项目 返回错误 如果编译成功,返回 nil

func GoEnv

func GoEnv() ([]string, error)

GoEnv 解析go env命令的输出 返回一个字符串数组,每个元素是一个环境变量,格式为"key=value" 如果解析失败,返回错误

func GoGet

func GoGet(envs []string, dir string, mod string) error

GoGet 获取go模块 返回错误 如果获取成功,返回 nil

func GoModTidy

func GoModTidy(envs []string, dir string) error

GoModTidy 修复go mod tidy命令 返回错误 如果修复成功,返回 nil

func ShellExec

func ShellExec(dir string, shell string) error

Shell 执行shell命令 返回错误 如果执行成功,返回 nil

func ShellFixed

func ShellFixed(dir string, shell string) error

ShellFixed 修复shell脚本中的换行符 返回错误 如果修复成功,返回 nil

Types

This section is empty.

Jump to

Keyboard shortcuts

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