File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package main
18
18
19
19
import (
20
20
"context"
21
+ "fmt"
21
22
22
23
"github.com/go-logr/logr"
23
24
@@ -50,8 +51,7 @@ func (r *reconcileReplicaSet) Reconcile(request reconcile.Request) (reconcile.Re
50
51
}
51
52
52
53
if err != nil {
53
- log .Error (err , "Could not fetch ReplicaSet" )
54
- return reconcile.Result {}, err
54
+ return reconcile.Result {}, fmt .Errorf ("could not fetch ReplicaSet: %+v" , err )
55
55
}
56
56
57
57
// Print the ReplicaSet
@@ -69,8 +69,7 @@ func (r *reconcileReplicaSet) Reconcile(request reconcile.Request) (reconcile.Re
69
69
rs .Labels ["hello" ] = "world"
70
70
err = r .client .Update (context .TODO (), rs )
71
71
if err != nil {
72
- log .Error (err , "Could not write ReplicaSet" )
73
- return reconcile.Result {}, err
72
+ return reconcile.Result {}, fmt .Errorf ("could not write ReplicaSet: %+v" , err )
74
73
}
75
74
76
75
return reconcile.Result {}, nil
You can’t perform that action at this time.
0 commit comments