From 9c03db59c1ba44ab774678f45a568ffd37add5f5 Mon Sep 17 00:00:00 2001 From: SAY-5 Date: Wed, 15 Apr 2026 09:13:19 -0700 Subject: [PATCH] fix(structs): correct 'occured' -> 'occurred' in ACLTemplatedPolicy errors Two fmt.Errorf strings in agent/structs/acl_templated_policy.go used 'an error occured when' instead of 'an error occurred when'. Both errors are wrapped and surfaced through the templated-policy parsing path, so the spelling is user-visible in API error responses. go build on agent/structs stays clean. --- agent/structs/acl_templated_policy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/structs/acl_templated_policy.go b/agent/structs/acl_templated_policy.go index 80a7e3a9b7b..f8b3a49d4f5 100644 --- a/agent/structs/acl_templated_policy.go +++ b/agent/structs/acl_templated_policy.go @@ -259,7 +259,7 @@ func (tp *ACLTemplatedPolicy) aclTemplatedPolicyRules(entMeta *acl.EnterpriseMet parsedTpl, err := tpl.Parse(tmplCode.Template) if err != nil { - return "", fmt.Errorf("an error occured when parsing template structs: %w", err) + return "", fmt.Errorf("an error occurred when parsing template structs: %w", err) } var buf bytes.Buffer err = parsedTpl.Execute(&buf, struct { @@ -272,7 +272,7 @@ func (tp *ACLTemplatedPolicy) aclTemplatedPolicyRules(entMeta *acl.EnterpriseMet ACLTemplatedPolicyVariables: tp.TemplateVariables, }) if err != nil { - return "", fmt.Errorf("an error occured when executing on templated policy variables: %w", err) + return "", fmt.Errorf("an error occurred when executing on templated policy variables: %w", err) } return buf.String(), nil