Browse Source

chore: fix function names in comment (#1813)

Signed-off-by: findnature <cricis@aliyun.com>
findnature 2 năm trước cách đây
mục cha
commit
5072d7a58f
2 tập tin đã thay đổi với 5 bổ sung và 5 xóa
  1. 4 4
      internal/metrix/meter.go
  2. 1 1
      policy/engine.go

+ 4 - 4
internal/metrix/meter.go

@@ -91,12 +91,12 @@ func (m *Meter) SSHSigned(p provisioner.Interface, err error) {
 	incrProvisionerCounter(m.ssh.signed, p, err)
 }
 
-// SSHAuthorized implements [authority.Meter] for [Meter].
+// SSHWebhookAuthorized implements [authority.Meter] for [Meter].
 func (m *Meter) SSHWebhookAuthorized(p provisioner.Interface, err error) {
 	incrProvisionerCounter(m.ssh.webhookAuthorized, p, err)
 }
 
-// SSHEnriched implements [authority.Meter] for [Meter].
+// SSHWebhookEnriched implements [authority.Meter] for [Meter].
 func (m *Meter) SSHWebhookEnriched(p provisioner.Interface, err error) {
 	incrProvisionerCounter(m.ssh.webhookEnriched, p, err)
 }
@@ -116,12 +116,12 @@ func (m *Meter) X509Signed(p provisioner.Interface, err error) {
 	incrProvisionerCounter(m.x509.signed, p, err)
 }
 
-// X509Authorized implements [authority.Meter] for [Meter].
+// X509WebhookAuthorized implements [authority.Meter] for [Meter].
 func (m *Meter) X509WebhookAuthorized(p provisioner.Interface, err error) {
 	incrProvisionerCounter(m.x509.webhookAuthorized, p, err)
 }
 
-// X509Enriched implements [authority.Meter] for [Meter].
+// X509WebhookEnriched implements [authority.Meter] for [Meter].
 func (m *Meter) X509WebhookEnriched(p provisioner.Interface, err error) {
 	incrProvisionerCounter(m.x509.webhookEnriched, p, err)
 }

+ 1 - 1
policy/engine.go

@@ -270,7 +270,7 @@ func (e *NamePolicyEngine) IsSSHCertificateAllowed(cert *ssh.Certificate) error
 	return e.validateNames(dnsNames, ips, emails, []*url.URL{}, principals)
 }
 
-// splitPrincipals splits SSH certificate principals into DNS names, emails and usernames.
+// splitSSHPrincipals splits SSH certificate principals into DNS names, emails and usernames.
 func splitSSHPrincipals(cert *ssh.Certificate) (dnsNames []string, ips []net.IP, emails, principals []string, err error) {
 	dnsNames = []string{}
 	ips = []net.IP{}