@@ -43,7 +43,7 @@ const maxMachineTypeItems = 20
4343// - 1-year: "1yr", "1", "12mo"
4444// - 3-year: "3yr", "3", "36mo"
4545//
46- // An empty or unrecognised term returns an error rather than silently defaulting
46+ // An empty or unrecognized term returns an error rather than silently defaulting
4747// to 12 months; a silent mis-default can purchase the wrong term and waste money.
4848func termPlan (term string ) (string , error ) {
4949 switch strings .ToLower (strings .TrimSpace (term )) {
@@ -52,7 +52,7 @@ func termPlan(term string) (string, error) {
5252 case "1yr" , "1" , "12mo" :
5353 return computepb .Commitment_TWELVE_MONTH .String (), nil
5454 default :
55- return "" , fmt .Errorf ("termPlan: unrecognised commitment term %q (accepted: 1yr/1/12mo or 3yr/3/36mo)" , term )
55+ return "" , fmt .Errorf ("termPlan: unrecognized commitment term %q (accepted: 1yr/1/12mo or 3yr/3/36mo)" , term )
5656 }
5757}
5858
@@ -390,7 +390,7 @@ type CommitmentRequest struct {
390390// single commitments.insert call.
391391// Each recommendation's Count is treated as vCPU count; the memory Amount is
392392// read from ComputeDetails.MemoryGB (populated by extractMemoryMBFromRecommendation).
393- // Recommendations with an unrecognised term or missing memory are skipped with a
393+ // Recommendations with an unrecognized term or missing memory are skipped with a
394394// log warning so a bad rec never contaminates an otherwise valid group.
395395func GroupCommitments (recs []common.Recommendation ) []CommitmentRequest {
396396 type key struct { account , region , term string }
@@ -407,7 +407,7 @@ func GroupCommitments(recs []common.Recommendation) []CommitmentRequest {
407407 }
408408 plan , err := termPlan (rec .Term )
409409 if err != nil {
410- log .Printf ("GroupCommitments: skipping recommendation with unrecognised term %q: %v" , rec .Term , err )
410+ log .Printf ("GroupCommitments: skipping recommendation with unrecognized term %q: %v" , rec .Term , err )
411411 continue
412412 }
413413 recMemMB , err := memoryMBFromDetails (rec )
@@ -903,7 +903,7 @@ func skuMatchesMachineType(sku *cloudbilling.Sku, machineType, region string) bo
903903// BreakEvenMonths so the scorer can filter and rank GCP recommendations correctly
904904// (issue #1022 C2). Pricing failures are logged but do not discard the recommendation:
905905// EstimatedSavings from the Recommender payload is the authoritative savings signal.
906- // Returns nil when the params.Term is unrecognised so the caller skips an
906+ // Returns nil when the params.Term is unrecognized so the caller skips an
907907// unroutable recommendation rather than queuing a purchase with an invalid plan.
908908func (c * ComputeEngineClient ) convertGCPRecommendation (ctx context.Context , gcpRec * recommenderpb.Recommendation , params common.RecommendationParams ) * common.Recommendation {
909909 // GCP CUDs are billed monthly with no upfront option; force "monthly"
@@ -917,13 +917,13 @@ func (c *ComputeEngineClient) convertGCPRecommendation(ctx context.Context, gcpR
917917 paymentOption := "monthly"
918918
919919 // H-3: propagate params.Term (default "1yr") and validate it so an
920- // unrecognised term fails loud here rather than reaching buildInsertRequest.
920+ // unrecognized term fails loud here rather than reaching buildInsertRequest.
921921 term := params .Term
922922 if term == "" {
923923 term = "1yr"
924924 }
925925 if _ , err := termPlan (term ); err != nil {
926- log .Printf ("computeengine: skipping recommendation with unrecognised term %q: %v" , term , err )
926+ log .Printf ("computeengine: skipping recommendation with unrecognized term %q: %v" , term , err )
927927 return nil
928928 }
929929
0 commit comments