rename the 'stateok' return value to 'checkok'
The naming was confusing because the boolean return value expresses whether the resource needed changing (the check failed) as opposed to the state not being not OK. purpleidea note: The "stateok" (now properly renamed to "checkok") is actually the historical bool return value of the Check() -> bool function which is now part of the CheckApply() amalgamation. This is an easy way to think about it if you're trying to understand why at the end of a successful apply we return false, nil.
This commit is contained in:
2
pkg.go
2
pkg.go
@@ -241,7 +241,7 @@ func (obj *PkgRes) pkgMappingHelper(bus *Conn) (map[string]*PkPackageIDActionDat
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (obj *PkgRes) CheckApply(apply bool) (stateok bool, err error) {
|
||||
func (obj *PkgRes) CheckApply(apply bool) (checkok bool, err error) {
|
||||
log.Printf("%v: CheckApply(%t)", obj.fmtNames(obj.getNames()), apply)
|
||||
|
||||
if obj.State == "" { // TODO: Validate() should replace this check!
|
||||
|
||||
Reference in New Issue
Block a user