Skip to content

Commit 9dd3aa7

Browse files
committed
style(purchase): US-spell misspell linter findings in touched files
Fix British spellings flagged by golangci-lint misspell in the two files touched by the #95 TODO-update commit: execution.go and service_details_codec.go. Changes are comment-only. behaviour -> behavior, recognise/normalise/honour -> recognize/normalize/honor
1 parent 9ff0a4f commit 9dd3aa7

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎internal/purchase/execution.go‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func (m *Manager) resolveGCPProvider(ctx context.Context, account config.CloudAc
473473

474474
// getMaxAccountParallelism is a thin alias over the shared
475475
// execution.ConcurrencyFromEnv so the purchase manager and the scheduler
476-
// both honour the same CUDLY_MAX_ACCOUNT_PARALLELISM override.
476+
// both honor the same CUDLY_MAX_ACCOUNT_PARALLELISM override.
477477
func getMaxAccountParallelism() int {
478478
return execution.ConcurrencyFromEnv()
479479
}
@@ -648,7 +648,7 @@ func recordHistoryAuditGap(exec *config.PurchaseExecution, commitmentID string,
648648
// token and the provider dedupes the purchase. It falls back to ExecutionID
649649
// only for legacy rows persisted before migration 000066 (IdempotencyKey == "");
650650
// for a single un-retried execution that fallback is identical to the pre-fix
651-
// behaviour, and such legacy rows never gain a retry successor that could
651+
// behavior, and such legacy rows never gain a retry successor that could
652652
// diverge (the retry handler seeds the successor's key from the predecessor's
653653
// ExecutionID in that case, preserving the match).
654654
func idempotencyLineageKey(exec *config.PurchaseExecution) string {
@@ -812,7 +812,7 @@ func (m *Manager) buildPurchaseConfirmationData(exec *config.PurchaseExecution,
812812
}
813813

814814
// logRecCtxErr emits a diagnostic log line when a per-recommendation context has
815-
// been cancelled or timed out. It distinguishes DeadlineExceeded (the 30s per-rec
815+
// been canceled or timed out. It distinguishes DeadlineExceeded (the 30s per-rec
816816
// budget fired) from Canceled (a parent context stopped the execution) so that
817817
// CloudWatch filters can tell the two apart without parsing error strings.
818818
// It is a no-op when recCtxErr is nil.
@@ -958,8 +958,8 @@ func (m *Manager) executeSinglePurchase(ctx context.Context, rec config.Recommen
958958
// mapServiceType maps a service string to common.ServiceType. Both the
959959
// canonical hyphenated slugs (compute, relational-db, cache, search,
960960
// data-warehouse) and the legacy AWS-only slugs (ec2, rds, elasticache,
961-
// opensearch, redshift, memorydb) are recognised; everything else passes
962-
// through verbatim. Savings Plans slugs are normalised by mapSavingsPlansSlug.
961+
// opensearch, redshift, memorydb) are recognized; everything else passes
962+
// through verbatim. Savings Plans slugs are normalized by mapSavingsPlansSlug.
963963
func (m *Manager) mapServiceType(service string) common.ServiceType {
964964
if svc, ok := mapSavingsPlansSlug(service); ok {
965965
return svc
@@ -1009,7 +1009,7 @@ func mapServiceSlug(service string) (common.ServiceType, bool) {
10091009
return svc, ok
10101010
}
10111011

1012-
// mapSavingsPlansSlug normalises both the canonical hyphenated SP slugs and
1012+
// mapSavingsPlansSlug normalizes both the canonical hyphenated SP slugs and
10131013
// the dash-free spellings the frontend has historically sent into the
10141014
// matching common.ServiceType. The map covers the legacy umbrella plus the
10151015
// four per-plan-type slugs in both spellings — pulled out of mapServiceType

‎pkg/common/service_details_codec.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func MarshalServiceDetails(details ServiceDetails) (json.RawMessage, error) {
6060
// "savingsplans", "savings-plans-compute" and the dash-free spellings —
6161
// see internal/purchase/execution.go: mapServiceType / mapSavingsPlansSlug).
6262
//
63-
// Behaviour:
63+
// Behavior:
6464
// - raw is empty AND service maps to a known *Details type → returns a
6565
// zero-valued typed pointer (the legacy / pre-#453 fallback). The
6666
// downstream service client's buildOfferingFilters tolerates zero-
@@ -79,7 +79,7 @@ func DecodeServiceDetailsFor(service string, raw json.RawMessage) (ServiceDetail
7979
if !ok {
8080
// Service has no *Details type — nothing to decode. Empty raw
8181
// payload is fine; a non-empty payload on a service we don't
82-
// recognise is suspicious but tolerated (writers and readers
82+
// recognize is suspicious but tolerated (writers and readers
8383
// might be on different versions during a rolling deploy).
8484
return nil, nil
8585
}
@@ -124,7 +124,7 @@ func newDetailsForService(service string) (ServiceDetails, bool) {
124124
// values of ServiceSavingsPlans / ServiceSavingsPlansCompute etc.;
125125
// "savings-plans" (with a dash) is the legacy umbrella alias that
126126
// internal/purchase/execution.go: mapSavingsPlansSlug still
127-
// recognises so purchase_executions JSONB rows persisted before
127+
// recognizes so purchase_executions JSONB rows persisted before
128128
// the rename in PR #94 (merged 2026-04-30) still resolve.
129129
// TODO(#95): drop "savings-plans" here once the ~6-month retention
130130
// window has passed (earliest 2026-10-30). See execution.go
@@ -139,7 +139,7 @@ func newDetailsForService(service string) (ServiceDetails, bool) {
139139

140140
// Services that don't currently type-assert Details in
141141
// findOfferingID (OpenSearch / Redshift / MemoryDB read rec.ResourceType
142-
// directly). We still recognise OpenSearch and Redshift here so a
142+
// directly). We still recognize OpenSearch and Redshift here so a
143143
// forthcoming refactor that starts asserting can flip the table
144144
// value without changing call sites. MemoryDB has no dedicated
145145
// *Details type yet, so it's intentionally absent — callers see

0 commit comments

Comments
 (0)