Documentation ¶
Index ¶
- Variables
- func CharIsNum(s string) int
- func Contains(a []string, x string) bool
- func DebugYmlContent(dir, filename string)
- func Dvvvv(a ...interface{})
- func Dvvvvv(a ...interface{})
- func Fail(mark string, hint string)
- func GetDefaultModuleDir() string
- func GetGitRepoName(url string) string
- func GetHeadRev(repodir string) string
- func GetRandomName(retry int) string
- func GraceExit(mark string, hint string)
- func IndexOf(a []string, x string) int
- func InvalidAndExit(mark string, hint string)
- func LogDesc(descType string, contextIdx1 int, taskLayerCnt int, name string, desc string)
- func LogError(mark string, err interface{})
- func LogErrorAndContinue(mark string, err interface{}, hint string)
- func LogErrorAndExit(mark string, err interface{}, hint string)
- func LogErrorMsg(mark string, reason string)
- func LogOk(mark string)
- func LogWarn(mark string, reason string)
- func PStackTrace()
- func Pdebug(a ...interface{})
- func PdebugN(mark int, a ...interface{})
- func PdebugStack(a ...interface{})
- func Pdebugvvvvvvv(a ...interface{})
- func Pdryrun(a ...interface{})
- func PfHiColor(format string, a ...interface{})
- func Pfdryrun(format string, a ...interface{})
- func Pferror(format string, a ...interface{})
- func Pfv(format string, a ...interface{})
- func Pfvv(format string, a ...interface{})
- func Pfvvv(format string, a ...interface{})
- func Pfvvvv(format string, a ...interface{})
- func Pfvvvvv(format string, a ...interface{})
- func Ppfmsg(mark string, a ...interface{})
- func Ppmsg(a ...interface{})
- func PpmsgHintHighPermitted(vlevel string, hint string, a ...interface{})
- func Ppmsgvvv(a ...interface{})
- func Ppmsgvvvhint(hint string, a ...interface{})
- func PpmsgvvvhintHigh(hint string, a ...interface{})
- func Ppmsgvvvv(a ...interface{})
- func PpmsgvvvvHigh(a ...interface{})
- func Ppmsgvvvvhint(hint string, a ...interface{})
- func PpmsgvvvvhintHigh(hint string, a ...interface{})
- func Ppmsgvvvvv(hint string, a ...interface{})
- func Ppmsgvvvvvhint(hint string, a ...interface{})
- func PpmsgvvvvvhintHigh(hint string, a ...interface{})
- func Ppromptvvvvv(valueName, hint string)
- func PrintContentWithLineNuber(content string) string
- func Ptmpdebug(mark string, a ...interface{})
- func Ptrace(mark, info string)
- func Pvv(a ...interface{})
- func Pvvv(a ...interface{})
- func Pvvvv(a ...interface{})
- func Pvvvvv(a ...interface{})
- func RandomColorName() string
- func RemoveCr(str string) string
- func RemoveIndex(s []string, index int) []string
- func RunSimpleCmd(dir string, command string) error
- func Sleep(mscnt int)
- func Spfv(format string, a ...interface{}) string
- func Sppmsg(a ...interface{}) string
- func StrIn(s string, aStrList ...string) int
- func SubStepStatus(mark string, statusCode int)
- func Trace()
- func YamlLoader(id, path, filename string) *viper.Viper
- type CmdOpts
- type ExecResult
- type Module
- type ModuleLockMap
- type Modules
- type SecureSetting
- type UpConfig
- func (cfg *UpConfig) GetWorkdirOld() (wkdir string)
- func (cfg *UpConfig) InitConfig() *UpConfig
- func (cfg *UpConfig) SetAbsWorkdir()
- func (cfg *UpConfig) SetModulename(modulename string)
- func (cfg *UpConfig) SetRefdir(refdir string)
- func (cfg *UpConfig) SetTaskfile(taskfile string)
- func (cfg *UpConfig) SetVerbose(cmdV string)
- func (cfg *UpConfig) SetWorkdir(workdir string)
- func (cfg *UpConfig) ShowCoreConfig(mark string)
- type UpConfigLoader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UpModuleDir = ".upmodules" DEFAULT_CONFIG = `` /* 165-byte string literal not displayed */ DEFAULT_UP_TASK_YML = `` /* 152-byte string literal not displayed */ Yq_read_hint = ` path format: 1. 'a.b.c' 2. 'a.*.c' 3. 'a.**.c' 4. 'a.(child.subchild==co*).c' 5. 'a.array[0].blah' 6. 'a.array[*].blah' ` )
View Source
var ( P = fmt.Print Pln = fmt.Println Pf = fmt.Printf Sp = fmt.Sprint Spf = fmt.Sprintf FgColorMap map[string]color.Attribute = map[string]color.Attribute{ "black": color.FgBlack, "red": color.FgRed, "green": color.FgGreen, "yello": color.FgYellow, "blue": color.FgBlue, "magenta": color.FgMagenta, "cyan": color.FgCyan, "white": color.FgWhite, "hiblack": color.FgHiBlack, "hiRed": color.FgHiRed, "higreen": color.FgHiGreen, "hiyello": color.FgHiYellow, "hiblue": color.FgHiBlue, "himagenta": color.FgHiMagenta, "hicyan": color.FgHiCyan, "hiwhite": color.FgHiWhite, } BgColorMap map[string]color.Attribute = map[string]color.Attribute{ "black": color.BgBlack, "red": color.BgRed, "green": color.BgGreen, "yello": color.BgYellow, "blue": color.BgBlue, "magenta": color.BgMagenta, "cyan": color.BgCyan, "white": color.BgWhite, "hiblack": color.BgHiBlack, "hiRed": color.BgHiRed, "higreen": color.BgHiGreen, "hiyello": color.BgHiYellow, "hiblue": color.BgHiBlue, "himagenta": color.BgHiMagenta, "hicyan": color.BgHiCyan, "hiwhite": color.BgHiWhite, } ColorNames = func() []string { keys := make([]string, 0, len(FgColorMap)) for k, _ := range FgColorMap { keys = append(keys, k) } return keys }() )
Functions ¶
func DebugYmlContent ¶
func DebugYmlContent(dir, filename string)
func GetDefaultModuleDir ¶
func GetDefaultModuleDir() string
func GetGitRepoName ¶
func GetHeadRev ¶
func GetRandomName ¶
func InvalidAndExit ¶
func LogErrorAndContinue ¶
func LogErrorAndExit ¶
func LogErrorMsg ¶
func PStackTrace ¶
func PStackTrace()
func PdebugStack ¶
func PdebugStack(a ...interface{})
func Pdebugvvvvvvv ¶
func Pdebugvvvvvvv(a ...interface{})
func PpmsgHintHighPermitted ¶
func Ppmsgvvvhint ¶
func Ppmsgvvvhint(hint string, a ...interface{})
func PpmsgvvvhintHigh ¶
func PpmsgvvvhintHigh(hint string, a ...interface{})
func PpmsgvvvvHigh ¶
func PpmsgvvvvHigh(a ...interface{})
func Ppmsgvvvvhint ¶
func Ppmsgvvvvhint(hint string, a ...interface{})
func PpmsgvvvvhintHigh ¶
func PpmsgvvvvhintHigh(hint string, a ...interface{})
func Ppmsgvvvvv ¶
func Ppmsgvvvvv(hint string, a ...interface{})
func Ppmsgvvvvvhint ¶
func Ppmsgvvvvvhint(hint string, a ...interface{})
func PpmsgvvvvvhintHigh ¶
func PpmsgvvvvvhintHigh(hint string, a ...interface{})
func Ppromptvvvvv ¶
func Ppromptvvvvv(valueName, hint string)
func RandomColorName ¶
func RandomColorName() string
func RemoveIndex ¶
func RunSimpleCmd ¶
func SubStepStatus ¶
func YamlLoader ¶
Types ¶
type ExecResult ¶
type Module ¶
type Module struct { Repo string Tag string Version string Alias string Dir string Subdir string Iid string PullPolicy string }
func (*Module) PullRepo ¶
func (m *Module) PullRepo(revMap *ModuleLockMap, uselock bool)
func (*Module) ShowDetails ¶
func (m *Module) ShowDetails()
type ModuleLockMap ¶
func LoadModuleLockRevs ¶
func LoadModuleLockRevs() *ModuleLockMap
type Modules ¶
type Modules []Module
func (Modules) LocateModule ¶
func (*Modules) PullCascadedModules ¶
func (*Modules) PullMainModules ¶
func (*Modules) PullModules ¶
func (ms *Modules) PullModules()
func (*Modules) ReportModules ¶
func (ms *Modules) ReportModules()
type SecureSetting ¶
type UpConfig ¶
type UpConfig struct { Version string RefDir string //choice of cwd | refdir //default to be cwd WorkDir string AbsWorkDir string TaskFile string Verbose string ModuleName string //default: /bin/sh, or the path given: /usr/local/bin/bash, or simply: GOSH ShellType string MaxCallLayers string MaxModuelCallLayers string //TODO: get rid of pointer as it will result in nil pointer loading issue Secure *SecureSetting Modules Modules ModuleLock bool }
var (
MainConfig *UpConfig
)
func NewUpConfig ¶
func (*UpConfig) GetWorkdirOld ¶
func (*UpConfig) InitConfig ¶
func (*UpConfig) SetAbsWorkdir ¶
func (cfg *UpConfig) SetAbsWorkdir()
return abs path this must be called before tasker changing dir
func (*UpConfig) SetModulename ¶
func (*UpConfig) SetTaskfile ¶
func (*UpConfig) SetVerbose ¶
func (*UpConfig) SetWorkdir ¶
func (*UpConfig) ShowCoreConfig ¶
type UpConfigLoader ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.