Documentation ¶
Index ¶
Constants ¶
View Source
const ( BaseDir = "/etc/bk_dist" RunDir = ".tbs" OSWindows = "windows" )
Variables ¶
This section is empty.
Functions ¶
func GetRunFile ¶
GetRunFile get the runtime file from run dir
Types ¶
type CmdReplaceRule ¶
type CmdReplaceRule struct { Cmd string `json:"cmd" value:"" usage:"used to match target cmd, it's optional"` CmdWay MatchWay `json:"cmd_match_way" value:"match_equal" usage:"match way for cmd"` Anchor string `json:"anchor_key" value:"" usage:"anchor key to search, is can't be empty"` AnchorWay MatchWay `json:"anchor_match_way" value:"match_equal" usage:"match way for anchor"` ReplaceOffset int `json:"replace_offset" value:"0" usage:"the offset with Anchor index, it can't out of range of parameter array"` SourceRegKey string `json:"source_reg_key" value:"" usage:"the source key to be replaced specified by regex"` TargetKey string `json:"target_key" value:"" usage:"the target key to be replaced"` }
CmdReplaceRule define replace rules for input cmd
func (CmdReplaceRule) Replace ¶
func (r CmdReplaceRule) Replace(cmd string, parameters []string)
Replace replace input parameters with this rule
Click to show internal directories.
Click to hide internal directories.