Documentation ¶
Index ¶
- func DirExistAndHasContent(dirPath string) error
- func DirHasContentWithCertainExtension(dirPath string, extensions []string) error
- func EscapeValues(value string) string
- func FileHasExtension(filePath, extension string) error
- func GenerateRandomName(retry int) string
- func GenerateRandomString(opt RandomStringOptions) string
- func GetSSHAuthSock() string
- func GetSSHGitSecureConnectCommand() string
- func GetUUID() string
- func IsValidDirE(path string) error
- func IsValidFileE(filePath string) error
- func MergeMaps(maps ...map[string]string) map[string]string
- func MergeSlices(slices ...[]string) []string
- func RemoveDoubleQuotes(target string) string
- type RandomStringOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirExistAndHasContent ¶
func DirHasContentWithCertainExtension ¶ added in v1.2.0
func EscapeValues ¶ added in v1.2.0
func FileHasExtension ¶ added in v1.3.0
func GenerateRandomName ¶
func GenerateRandomString ¶
func GenerateRandomString(opt RandomStringOptions) string
func GetSSHAuthSock ¶ added in v1.2.0
func GetSSHAuthSock() string
func GetSSHGitSecureConnectCommand ¶ added in v1.2.0
func GetSSHGitSecureConnectCommand() string
GetSSHGitSecureConnectCommand returns an SSH command string configured for secure connections by bypassing the usual host key storage mechanism. It's particularly useful for Git operations over SSH in environments where strict host key verification needs to be relaxed, such as automated scripts or continuous integration systems connecting to dynamically changing servers. This command automatically accepts new host keys but prevents connections to hosts with changed keys, mitigating man-in-the-middle attacks without requiring manual intervention for known host key management.
func IsValidDirE ¶ added in v1.2.0
func IsValidFileE ¶ added in v1.3.0
func MergeSlices ¶ added in v1.2.0
func RemoveDoubleQuotes ¶
Types ¶
type RandomStringOptions ¶
Click to show internal directories.
Click to hide internal directories.