Documentation
¶
Index ¶
- Variables
- func ConvertStringSliceToMap(values []string) map[string]string
- func DefaultEnv(key string, _default string) string
- func FileInfoStat(fi os.FileInfo) *syscall.Stat_t
- func GetUIDGID() (int, int, error)
- func IsSpecialFile(fi os.FileInfo) bool
- func MergeEnv(envList []string, newEnvMap map[string]string) []string
- func MergeStringMaps(mapOne, mapTwo map[string]string) map[string]string
- func MergeStructMaps(mapOne, mapTwo map[string]struct{}) map[string]struct{}
- func Min(a int64, others ...int64) int64
- func Must(condition bool, message string, arguments ...interface{})
- type MultiErrors
Constants ¶
This section is empty.
Variables ¶
var BuildHash string
BuildHash is a variable that will be populated at build-time of the binary via the ldflags parameter. It is used to break cache when a new version of makisu is used.
Functions ¶
func ConvertStringSliceToMap ¶
ConvertStringSliceToMap parses a string slice as "=" separated key value pairs, and returns a map.
func DefaultEnv ¶
DefaultEnv returns the environment variable <key> if it is found, and _default otherwise.
func FileInfoStat ¶
FileInfoStat provides a convenience wrapper for casting the generic FileInfo.Sys field.
func IsSpecialFile ¶
IsSpecialFile returns true for file types that overlayfs ignores. Overlayfs logic:
#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
func MergeEnv ¶
MergeEnv merges a new env key value pair into existing list. This is needed because Docker image config defines Env as []string, but actually uses it as map[string]string.
func MergeStringMaps ¶
MergeStringMaps merges two string maps and returns the combined map. If there are duplicate keys it picks value from second map.
func MergeStructMaps ¶
MergeStructMaps merges two struct maps and returns the combined map. If there are duplicate keys it picks value from second map.
Types ¶
type MultiErrors ¶
MultiErrors contains a list of errors. It supports adding and collecting errors in multiple threads.
func NewMultiErrors ¶
func NewMultiErrors() *MultiErrors
NewMultiErrors returns a new MultiErrors obj.
func (*MultiErrors) Collect ¶
func (e *MultiErrors) Collect() error
Collect returns the result error.