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:
Felix Frank
2016-05-14 18:09:29 +02:00
parent 995ca32eee
commit 3aaa80974e
6 changed files with 10 additions and 10 deletions

View File

@@ -328,7 +328,7 @@ func (obj *FileRes) FileApply() error {
return nil // success
}
func (obj *FileRes) CheckApply(apply bool) (stateok bool, err error) {
func (obj *FileRes) CheckApply(apply bool) (checkok bool, err error) {
log.Printf("%v[%v]: CheckApply(%t)", obj.Kind(), obj.GetName(), apply)
if obj.isStateOK { // cache the state