Documentation
¶
Index ¶
- func Contains(items []string, target string) bool
- func ContainsEmpty(items ...string) bool
- func CopyDirectory(src, dst string) error
- func CopyFile(src, dst string) error
- func DeduplicateSliceStably(items []string) []string
- func DumpYaml(cfg interface{})
- func GetBinaryFileName(name string) string
- func GetExitCode(err error) int
- func GetFilesWithExt(dir string, targetExt string) ([]string, error)
- func GetFilesWithExtRecursively(target string, targetExt string) ([]string, error)
- func GetMapKeys(dict map[string]string) []string
- func IsDirExists(path string) (bool, error)
- func IsFileExists(path string) (bool, error)
- func IsRegularVersion(s string) bool
- func JoinGoPackageVersion(path, version string) string
- func LoadConfig(filename string, pointer interface{}) error
- func MatchPath(pattern string, path string) (bool, error)
- func RenderPathWithEnv(path string, ext map[string]string) string
- func RenderWithEnv(s string, ext map[string]string) string
- func SetToSlice(set map[string]struct{}) []string
- func SortSemanticVersion(items []string) ([]string, []string)
- func SplitGoPackageVersion(pkg string) (path string, version string, ok bool)
- func SplitYAML(data []byte) ([][]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsEmpty ¶
ContainsEmpty is used to check whether items contains empty string
func CopyDirectory ¶
CopyDirectory is used to copy directory If dst already exists, it will be merged
func DeduplicateSliceStably ¶
DeduplicateSliceStably is used to deduplicate slice items stably
func GetBinaryFileName ¶
GetBinaryFileName is used to get os based binary file name
func GetExitCode ¶
GetExitCode is used to parse exit code from cmd error
func GetFilesWithExt ¶
GetFilesWithExt is used to list files with a specific suffix expectExt should contain the prefix '.'
func GetFilesWithExtRecursively ¶
GetFilesWithExtRecursively is used to recursively list files with a specific suffix expectExt should contain the prefix '.'
func GetMapKeys ¶
GetMapKeys is used to get the keys of map
func IsDirExists ¶
IsDirExists is used to check whether the dir exists
func IsFileExists ¶
IsFileExists is used to check whether the file exists
func IsRegularVersion ¶
IsRegularVersion is used to determine whether the version number is a regular version number Regular: va.b.c, and a, b, c are all numbers
func JoinGoPackageVersion ¶
JoinGoPackageVersion is used to join go path and versions
func LoadConfig ¶
LoadConfig read YAML-formatted config from filename into cfg.
func RenderPathWithEnv ¶
RenderPathWithEnv is used to render path with environment
func RenderWithEnv ¶
RenderWithEnv is used to render string with env
func SetToSlice ¶
SetToSlice is used to convert set<string> to slice<string>
func SortSemanticVersion ¶
SortSemanticVersion is used to sort semantic version
func SplitGoPackageVersion ¶
SplitGoPackageVersion is used to split go package version
Types ¶
This section is empty.