Skip to content

docs: fix typos in comments and error messages - #204

Open
Avicennasis wants to merge 1 commit into
similarweb:masterfrom
Avicennasis:docs/fix-typos
Open

Avicennasis wants to merge 1 commit into
similarweb:masterfrom
Avicennasis:docs/fix-typos

Conversation

@Avicennasis

Copy link
Copy Markdown

Summary

Fixes 12 verified typos across 7 files - misspellings, a duplicated word, and several copy-paste mistakes in comments and error strings. No identifiers were renamed and no logic changed.

  • collector/aws/resources/elbv2.go: "invalid elbv2 volumes client" -> "invalid elbv2 client" (there are no volumes here); // Detect check with ELBV2 instance -> // Detect checks which ELBV2 instance; return list of load loadbalancers -> return list of loadbalancers
  • collector/aws/resources/elb.go: "invalid elb volumes client" -> "invalid elb client"; // Detect check with ELB instance -> // Detect checks which ELB instance (also drops the doubled space)
  • collector/aws/resources/neptune.go: "invalid lambda volumes client" -> "invalid neptune client" (copy-pasted from lambda.go; this is the Neptune detector)
  • collector/aws/resources/natgateway.go: // Detect check with elasticache instance is under utilization -> // Detect checks which NAT gateway is under utilization (copy-pasted from elasticache.go)
  • collector/aws/resources/ec2.go: is under utilized -> is underutilized
  • collector/aws/pricing/pricing.go: rate code form getting -> rate code for getting; PricingResponse describ the response -> PricingResponse describe the response; PriceCurrencyCode Descrive -> PriceCurrencyCode describe
  • notifiers/providers/slack/slack.go: if is it email -> if it is email

Please review carefully

Three of these are error strings, not comments, so the text returned by NewELBV2Manager, NewELBManager and NewNeptuneManager on a bad client changes. I grepped the test suite (elbv2_test.go, elb_test.go, neptune_test.go) - nothing asserts on these strings - and the wording now matches the correct form already used in ec2.go, rds.go, elasticache.go and natgateway.go ("invalid <service> client").

The // Detect checks which ... wording was chosen to match the already-correct comments in kinesis.go and neptune.go rather than inventing new phrasing.

Deliberately left alone

  • The misspelled exported identifiers ELBV2ClientDescreptor, EC2ClientDescreptor, ELBClientDescreptor and PricingClientDescreptor (and their doc comments). Newer files such as natgateway.go already spell it ...ClientDescriptor, so these look like real defects, but renaming exported types is an API change and out of scope for a typo PR. Happy to open a separate PR if you want them fixed.
  • The same // Detect check with ... phrasing in rds.go, docdb.go, elasticache.go, redshift.go and elasticsearch.go (redshift.go also carries the elasticache copy-paste), and the same spurious volumes in the error strings of kinesis.go, iam.go, redshift.go, lambda.go and elasticsearch.go. Kept out to keep this PR scoped - say the word and I will fold them in.

gofmt reports no new formatting issues from this change.

Fixes misspellings, a duplicated word, and several copy-paste errors in
comments and error strings across the AWS collector, pricing and Slack
notifier packages. No identifiers renamed; no logic changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant