mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
7fc1795cdf
Refactor the ostweaks file to allows a more easy reuse Add a method on the osl.Sandbox interface to allow setting knobs on the sandbox Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
16 lines
364 B
Go
16 lines
364 B
Go
package kernel
|
|
|
|
type conditionalCheck func(val1, val2 string) bool
|
|
|
|
// OSValue represents a tuple, value defired, check function when to apply the value
|
|
type OSValue struct {
|
|
Value string
|
|
CheckFn conditionalCheck
|
|
}
|
|
|
|
func propertyIsValid(val1, val2 string, check conditionalCheck) bool {
|
|
if check == nil || check(val1, val2) {
|
|
return true
|
|
}
|
|
return false
|
|
}
|