Documentation ¶
Index ¶
- func AddTrailingSlashIfNeeded(url string) string
- func Bool2Int(b bool) int
- func BuildTargetPath(pattern, path, target string, ignoreRepo bool) (string, error)
- func CheckErrorWithMessage(err error, message string) error
- func ConvertSliceToMap(slice []string) map[string]bool
- func CopyMap(src map[string]string) (dst map[string]string)
- func GetBoolEnvValue(flagName string, defValue bool) (bool, error)
- func GetLogMsgPrefix(threadId int, dryRun bool) string
- func GetRootPath(path string, useRegExp bool) string
- func GetUserAgent() string
- func GetUserHomeDir() string
- func IndentJson(jsonStr []byte) string
- func IsWindows() bool
- func MergeMaps(src map[string]string, dst map[string]string)
- func PrepareLocalPathForUpload(localPath string, useRegExp bool) string
- func ReplaceTildeWithUserHome(path string) string
- func SetUserAgent(newUserAgent string)
- func SplitWithEscape(str string, separator rune) []string
- func StringToBool(boolVal string, defaultValue bool) (bool, error)
- func TrimPath(path string) string
- type Artifact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTargetPath ¶
Replaces matched regular expression from path to corresponding {i} at target. Example 1:
pattern = "repoA/1(.*)234" ; path = "repoA/1hello234" ; target = "{1}" ; ignoreRepo = false returns "hello"
Example 2:
pattern = "repoA/1(.*)234" ; path = "repoB/1hello234" ; target = "{1}" ; ignoreRepo = true returns "hello"
func CheckErrorWithMessage ¶ added in v0.1.1
func ConvertSliceToMap ¶ added in v0.1.2
func GetBoolEnvValue ¶ added in v0.1.1
func GetLogMsgPrefix ¶
func GetRootPath ¶
Get the local root path, from which to start collecting artifacts to be used for: 1. Uploaded to Artifactory, 2. Adding to the local build-info, to be later published to Artifactory.
func GetUserAgent ¶
func GetUserAgent() string
func GetUserHomeDir ¶
func GetUserHomeDir() string
func IndentJson ¶
func SetUserAgent ¶
func SetUserAgent(newUserAgent string)
func SplitWithEscape ¶
Split str by the provided separator, escaping the separator if it is prefixed by a back-slash.
Types ¶
Click to show internal directories.
Click to hide internal directories.