github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/libnetwork/osl/kernel/knobs.go (about) 1 package kernel 2 3 type conditionalCheck func(val1, val2 string) bool 4 5 // OSValue represents a tuple, value defined, check function when to apply the value 6 type OSValue struct { 7 Value string 8 CheckFn conditionalCheck 9 } 10 11 func propertyIsValid(val1, val2 string, check conditionalCheck) bool { 12 if check == nil || check(val1, val2) { 13 return true 14 } 15 return false 16 }