Skip to content

Commit e7b1d33

Browse files
committed
Fix linting issues
1 parent 5b1f824 commit e7b1d33

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/controller/controllerutil/controllerutil.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,18 @@ func SetControllerReference(owner, object v1.Object, scheme *runtime.Scheme) err
5454
// OperationType is the action result of a CreateOrUpdate call
5555
type OperationType string
5656

57-
const ( // They should complete the sentence "v1.Deployment has been ..."
58-
OperationNoop = "unchanged"
57+
const ( // They should complete the sentence "Deployment default/foo has been ..."
58+
// OperationNoop means that the resource has not been changed
59+
OperationNoop = "unchanged"
60+
// OperationCreated means that a new resource has been created
5961
OperationCreated = "created"
62+
// OperationUpdated means that an existing resource has been updated
6063
OperationUpdated = "updated"
6164
)
6265

6366
// CreateOrUpdate creates or updates a kuberenes resource. It takes in a key and
6467
// a placeholder for the existing object and returns the modified object
65-
func CreateOrUpdate(c client.Client, ctx context.Context, key client.ObjectKey, existing runtime.Object, t TransformFn) (runtime.Object, OperationType, error) {
68+
func CreateOrUpdate(ctx context.Context, c client.Client, key client.ObjectKey, existing runtime.Object, t TransformFn) (runtime.Object, OperationType, error) {
6669
err := c.Get(ctx, key, existing)
6770
var obj runtime.Object
6871

0 commit comments

Comments
 (0)