本文整理汇总了Golang中github.com/boldfield/goxc/config.Settings.GetTaskSettingString方法的典型用法代码示例。如果您正苦于以下问题:Golang Settings.GetTaskSettingString方法的具体用法?Golang Settings.GetTaskSettingString怎么用?Golang Settings.GetTaskSettingString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/boldfield/goxc/config.Settings
的用法示例。
在下文中一共展示了Settings.GetTaskSettingString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: getArmArchName
func getArmArchName(settings *config.Settings) string {
armArchName := settings.GetTaskSettingString(TASK_DEB_GEN, "armarch")
if armArchName == "" {
//derive it from GOARM version:
goArm := settings.GetTaskSettingString(TASK_XC, "GOARM")
if goArm == "5" {
armArchName = "armel"
} else {
armArchName = "armhf"
}
}
return armArchName
}
示例2: codesignPlat
func codesignPlat(goos, arch string, binPath string, settings *config.Settings) error {
// settings.codesign only works on OS X for binaries generated for OS X.
id := settings.GetTaskSettingString("codesign", "id")
if id != "" && runtime.GOOS == platforms.DARWIN && goos == platforms.DARWIN {
if err := signBinary(binPath, id); err != nil {
log.Printf("codesign failed: %s", err)
return err
} else {
if !settings.IsQuiet() {
log.Printf("Signed with ID: %q", id)
}
return nil
}
}
return nil
}