Documentation ¶
Index ¶
- func FetchContentFromUrl(u string) ([]byte, error)
- func FileContains(loc string, match string) (bool, error)
- func FindFiles(root, pattern string, excludePattern string, skipDir []string) ([]string, error)
- func Glob(dir string, match string) ([]string, error)
- func HasComposerDependency(loc string, deps []string) (bool, error)
- func IntSliceContains(slice []int, item int) bool
- func IsDirectory(path string) (bool, error)
- func IsFileInDirs(root string, file string, dirs []string) bool
- func LookupYamlPath(n *yaml.Node, path string) ([]*yaml.Node, error)
- func MergeBoolPtrs(boolA *bool, boolB *bool)
- func MergeIntSlice(slcA *[]int, slcB []int)
- func MergeString(strA *string, strB string)
- func MergeStringSlice(slcA *[]string, slcB []string)
- func PackageCheckString(slice []string, item string, item_version string) bool
- func SliceContains(slice any, item any) bool
- func StringIsUrl(s string) bool
- func StringSliceContains(slice []string, item string) bool
- func StringSliceMatch(slice []string, item string) bool
- func StringSlicesInterdiff(slc1 []string, slc2 []string) []string
- func StringSlicesInterdiffUnique(slc1, slc2 []string) []string
- func StringSlicesIntersect(slc1 []string, slc2 []string) []string
- func StringSlicesIntersectUnique(slc1, slc2 []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchContentFromUrl ¶ added in v0.1.11
FetchContentFromUrl fetches the content from a url and returns its bytes.
func FindFiles ¶
FindFiles scans a directory for files matching the provided pattern. excludePattern can be used to ignore files using regex, and a list of directories can be skipped using skipDir.
func HasComposerDependency ¶ added in v0.2.0
func IntSliceContains ¶ added in v0.1.14
IntSliceContains determines whether an item exists in a slice of int.
func IsDirectory ¶ added in v0.2.0
func IsFileInDirs ¶ added in v0.1.17
IsFileInDirs determines whether a file is in a list of directories. root is assumed to be a reference directory, file is the file path with the root prefixed and dirs is a list of relative paths from the root.
func LookupYamlPath ¶ added in v0.1.14
LookupYamlPath attempts to query Yaml data using a JSONPath query and returns the found Node. It uses the implemention by https://github.com/vmware-labs/yaml-jsonpath.
func MergeBoolPtrs ¶ added in v0.1.14
MergeBoolPtrs compares two bool pointers and replaces boolA with boolB if the latter is non-nil.
func MergeIntSlice ¶ added in v0.1.16
MergeIntSlice replaces the values of a int slice with those of another.
func MergeString ¶ added in v0.1.14
MergeString compares two strings and replaces strA with strB if the latter is not empty.
func MergeStringSlice ¶ added in v0.1.14
MergeStringSlice replaces the values of a string slice with those of another.
func PackageCheckString ¶ added in v0.3.0
Sift through a slice to determine if it contains eligible package with optional version constrains.
func SliceContains ¶ added in v0.3.0
SliceContains determines whether an item exists in a slice of any type.
func StringIsUrl ¶ added in v0.1.11
StringIsUrl determines whether a string is a url by trying to parse it.
func StringSliceContains ¶
StringSliceContains determines whether an item exists in a slice of string.
func StringSliceMatch ¶ added in v0.1.14
func StringSlicesInterdiff ¶ added in v0.3.0
StringSlicesInterdiff returns the strings in slc2 that do not present in slc1.
func StringSlicesInterdiffUnique ¶ added in v0.3.0
StringSlicesInterdiffUnique returns the unique strings in slc2 that do not present in slc1.
func StringSlicesIntersect ¶
StringSlicesIntersect finds the intersection between two slices of string.
func StringSlicesIntersectUnique ¶ added in v0.3.0
StringSlicesIntersectUnique returns the unique strings in slc2 that also present in slc1.
Types ¶
This section is empty.