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
file.go
2
file.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user