engine: resources: Remove named return params
Named return params aren't a favourite feature of mine, and they're rarely used in the resource writing. They keep popping up because I once used them and we've been copying and pasting code ever since. Get rid of them all to help prevent the unnecessary spread.
This commit is contained in:
@@ -150,7 +150,7 @@ func (obj *KVRes) Watch() error {
|
||||
}
|
||||
|
||||
// lessThanCheck checks for less than validity.
|
||||
func (obj *KVRes) lessThanCheck(value string) (checkOK bool, err error) {
|
||||
func (obj *KVRes) lessThanCheck(value string) (bool, error) {
|
||||
v := *obj.Value
|
||||
if value == v { // redundant check for safety
|
||||
return true, nil
|
||||
@@ -188,7 +188,7 @@ func (obj *KVRes) lessThanCheck(value string) (checkOK bool, err error) {
|
||||
}
|
||||
|
||||
// CheckApply method for Password resource. Does nothing, returns happy!
|
||||
func (obj *KVRes) CheckApply(apply bool) (checkOK bool, err error) {
|
||||
func (obj *KVRes) CheckApply(apply bool) (bool, error) {
|
||||
obj.init.Logf("CheckApply(%t)", apply)
|
||||
|
||||
if val, exists := obj.init.Recv()["Value"]; exists && val.Changed {
|
||||
|
||||
Reference in New Issue
Block a user