Documentation
¶
Index ¶
Constants ¶
View Source
const ( Set = iota Count Atomic )
View Source
const ( C_Type_Local = "build-config-local" C_Type_Remote = "build-config-remote" C_Type_Multi = "multiple-config" )
Variables ¶
View Source
var OutFileNameFmt string // 输出文件名格式: default/a default:使用go默认输出格式(packageName[.exe]),a:{package-name}-{os}-{arch}[.exe]
Functions ¶
func ExportDefaultConfigJson ¶
func ExportDefaultConfigJson(f string)
func ExportDefaultConfigYaml ¶
func ExportDefaultConfigYaml(f string)
func HaveMacroBeforeCompile ¶
func LoadDefault ¶
func LoadDefault()
func ParserMacro ¶
Types ¶
type BuildConfig ¶
type BuildConfig struct { InputFile string //单个文件名或路径 OutputFile string //输出文件名或路径 Ldflags []string //传递给链接参数的值 VarFlags []VarFlag //传递给main.go 中属性参数的值 V bool // -v 打印编译的包名和文件名 Cgo bool //enable cgo default false //不常用参数 ForceBuildPackage bool // -a 强制重新生成已更新的包。 BuildProcess int //-p n 编译线程数 Race bool // -race 启用数据竞争检测(only in 64bit ) Msan bool // -msan 启用内存分配扫描 linux/amd64, linux/arm64, freebsd/amd64 Cover bool // -cover 启用覆盖率分析 CoverMode int //设置覆盖率分析的模式 默认set Work bool //打印临时工作目录的名称,退出时不要将其删除。 AsmFlags []string //传递给汇编器的值 [pattern=]arg BuildMode string //编译模式 BuildVcs string //是否用版本控制信息标记二进制文件(auto,true,false) Compiler string //gccgo or gc Gccgoflags []string //arguments to pass on each gccgo compiler/linker invocation. Gcflags []string //arguments to pass on each go tool compile invocation. Mod string //readonly, vendor, or mod. Modcacherw bool //使模块缓存中新创建的目录保持读写状态,而不是使其只读。 Modfile string //fileName 使用备用的go.mod Overlay string //fileName 读取为构建操作提供overlay的JSON配置文件。 Pgo string //fileName 指定一个profile-guided optimization文件 Pkgdir string //dir 使用额外的包目录 Tags string //指定额外的tags // Targets []BuildArch //构建的目标架构 // HaveMacroBeforeCompile bool // contains filtered or unexported fields }
BuildConfig
构建配置 本地项目
func (*BuildConfig) Build ¶
func (c *BuildConfig) Build() bool
func (*BuildConfig) ParseConfig ¶
func (c *BuildConfig) ParseConfig() bool
type Task ¶
type Task struct { TaskID string TaskName string Config BuildConfig CreatTime time.Time }
func UsingLocal ¶
func UsingRemote ¶
Click to show internal directories.
Click to hide internal directories.