From 8479b29eab89efebcf28c0ff3b42deabdc74d795 Mon Sep 17 00:00:00 2001 From: rubyisrust Date: Tue, 18 Mar 2025 11:27:25 +0800 Subject: [PATCH] chore: make function comment match function name Signed-off-by: rubyisrust --- pkg/apis/policy/v1alpha1/clusterimagepolicy_lifecycle.go | 2 +- pkg/apis/policy/v1beta1/clusterimagepolicy_lifecycle.go | 2 +- pkg/reconciler/trustroot/trustroot.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/policy/v1alpha1/clusterimagepolicy_lifecycle.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_lifecycle.go index 4bbb9d676..7f95483d8 100644 --- a/pkg/apis/policy/v1alpha1/clusterimagepolicy_lifecycle.go +++ b/pkg/apis/policy/v1alpha1/clusterimagepolicy_lifecycle.go @@ -75,7 +75,7 @@ func (cs *ClusterImagePolicyStatus) MarkInlinePoliciesFailed(msg string) { cipCondSet.Manage(cs).MarkFalse(ClusterImagePolicyConditionPoliciesInlined, inlinePoliciesFailedReason, msg) } -// MarkInlinePoliciesdOk marks the status saying that the inlining of the +// MarkInlinePoliciesOk marks the status saying that the inlining of the // policies had no errors. func (cs *ClusterImagePolicyStatus) MarkInlinePoliciesOk() { cipCondSet.Manage(cs).MarkTrue(ClusterImagePolicyConditionPoliciesInlined) diff --git a/pkg/apis/policy/v1beta1/clusterimagepolicy_lifecycle.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_lifecycle.go index 1007789b1..8881ad6e3 100644 --- a/pkg/apis/policy/v1beta1/clusterimagepolicy_lifecycle.go +++ b/pkg/apis/policy/v1beta1/clusterimagepolicy_lifecycle.go @@ -75,7 +75,7 @@ func (cs *ClusterImagePolicyStatus) MarkInlinePoliciesFailed(msg string) { cipCondSet.Manage(cs).MarkFalse(ClusterImagePolicyConditionPoliciesInlined, inlinePoliciesFailedReason, msg) } -// MarkInlinePoliciesdOk marks the status saying that the inlining of the +// MarkInlinePoliciesOk marks the status saying that the inlining of the // policies had no errors. func (cs *ClusterImagePolicyStatus) MarkInlinePoliciesOk() { cipCondSet.Manage(cs).MarkTrue(ClusterImagePolicyConditionPoliciesInlined) diff --git a/pkg/reconciler/trustroot/trustroot.go b/pkg/reconciler/trustroot/trustroot.go index 085e9d282..5efd6ac69 100644 --- a/pkg/reconciler/trustroot/trustroot.go +++ b/pkg/reconciler/trustroot/trustroot.go @@ -200,7 +200,7 @@ func (r *Reconciler) getSigstoreKeysFromRemote(ctx context.Context, remote *v1al return GetSigstoreKeysFromTuf(ctx, tufClient, trustedRootTarget) } -// remoteTrustRootEntry removes a TrustRoot entry from a CM. If no entry exists, it's a nop. +// removeTrustRootEntry removes a TrustRoot entry from a CM. If no entry exists, it's a nop. func (r *Reconciler) removeTrustRootEntry(ctx context.Context, cm *corev1.ConfigMap, trustrootName string) error { patchBytes, err := resources.CreateRemovePatch(system.Namespace(), config.SigstoreKeysConfigName, cm.DeepCopy(), trustrootName) if err != nil { @@ -240,7 +240,7 @@ type sigstoreCustomMetadata struct { Sigstore customMetadata `json:"sigstore"` } -// getSigstoreKeysFromTuf returns the sigstore keys from the TUF client. Note +// GetSigstoreKeysFromTuf returns the sigstore keys from the TUF client. Note // that this should really be exposed from the sigstore/sigstore TUF pkg, but // is currently not. func GetSigstoreKeysFromTuf(ctx context.Context, tufClient *client.Client, trustedRootTarget string) (*config.SigstoreKeys, error) {