Documentation ¶
Index ¶
- func CheckPidFile(program string, pidFile string) error
- func CmdExists(name string) bool
- func CreatePidFile(program string, pidFile string) error
- func DestroyPidFile(pidFile string) error
- func FilepathSort(paths []string)
- func GetEnvVarInfo(v string) (string, string, error)
- func GetFsName(path string) (string, error)
- func MountSliceContains(s []specs.Mount, x specs.Mount, match func(a, b specs.Mount) bool) bool
- func MountSliceEqual(a, b []specs.Mount) bool
- func MountSliceRemove(s, db []specs.Mount, cmp func(m1, m2 specs.Mount) bool) []specs.Mount
- func MountSliceRemoveMatch(s []specs.Mount, match func(specs.Mount) bool) []specs.Mount
- func StringSliceContains(a []string, x string) bool
- func StringSliceEqual(a, b []string) bool
- func StringSliceFindShortest(s []string) string
- func StringSliceRemove(s, db []string) []string
- func StringSliceRemoveMatch(s []string, match func(string) bool) []string
- func StringSliceUniquify(s []string) []string
- type FilepathSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPidFile ¶
func CreatePidFile ¶
CreatePidFile writes a sysbox pid to a file. If the file already exists, and its pid matches a current sysbox program, then an error is returned.
func DestroyPidFile ¶
func FilepathSort ¶
func FilepathSort(paths []string)
Sorts the give set of filepaths hierarchically; paths must be absolute.
func GetEnvVarInfo ¶
GetEnvVarInfo returns the name and value of the given environment variable
func MountSliceContains ¶
MountSliceContains returns true if mount x is in slice s.
func MountSliceEqual ¶
func MountSliceEqual(a, b []specs.Mount) bool
Compares the given mount slices and returns true if the match
func MountSliceRemove ¶
func MountSliceRemove(s, db []specs.Mount, cmp func(m1, m2 specs.Mount) bool) []specs.Mount
MountSliceRemove removes from slice 's' any elements which occur on slice 'db'; the given function is used to compare elements.
func MountSliceRemoveMatch ¶
func MountSliceRemoveMatch(s []specs.Mount, match func(specs.Mount) bool) []specs.Mount
MountSliceRemoveMatch removes from slice 's' any elements for which the 'match' function returns true.
func StringSliceContains ¶
StringSliceContains returns true if x is in a
func StringSliceEqual ¶
StringSliceEqual compares two slices and returns true if they match
func StringSliceFindShortest ¶
finds the shortest string in the given slice
func StringSliceRemove ¶
StringSliceRemove removes from slice 's' any elements which occur on slice 'db'.
func StringSliceRemoveMatch ¶
StringSliceRemoveMatch removes from slice 's' any elements for which the 'match' function returns true.
func StringSliceUniquify ¶
uniquify a string slice (i.e., remove duplicate elements)
Types ¶
type FilepathSlice ¶
type FilepathSlice []string
func (FilepathSlice) Len ¶
func (fp FilepathSlice) Len() int
func (FilepathSlice) Less ¶
func (fp FilepathSlice) Less(i, j int) bool
Compares the number of "/" separated elements in paths fp[i] and fp[j].
func (FilepathSlice) Swap ¶
func (fp FilepathSlice) Swap(i, j int)