From 5072d7a58f37ad404361d2b56d6724a76b8faa11 Mon Sep 17 00:00:00 2001 From: findnature <167662920+findnature@users.noreply.github.com> Date: Thu, 25 Apr 2024 00:33:51 +0800 Subject: [PATCH] chore: fix function names in comment (#1813) Signed-off-by: findnature --- internal/metrix/meter.go | 8 ++++---- policy/engine.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/metrix/meter.go b/internal/metrix/meter.go index 334cf883..ec858308 100644 --- a/internal/metrix/meter.go +++ b/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) } diff --git a/policy/engine.go b/policy/engine.go index 56457325..0f9af0de 100755 --- a/policy/engine.go +++ b/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{}