Skip to content

Commit

Permalink
add NAT to initialisms (#245)
Browse files Browse the repository at this point in the history
Issue #, if available: N/A

Description of changes:
* Adds `NAT` to initialism with preventions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
brycahta authored Nov 17, 2021
1 parent 25c43e8 commit bbae305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/names/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ var (
{"Kms", "KMS", "kms", nil},
{"Ldap", "LDAP", "ldap", nil},
{"Mfa", "MFA", "mfa", nil},
// Prevent "Native" from becoming "NATive"
{"Nat", "NAT", "nat", regexp.MustCompile("Nat(?!i)", regexp.None)},
{"Oidc", "OIDC", "oidc", nil},
{"Sdk", "SDK", "sdk", nil},
{"Sha256", "SHA256", "sha256", nil},
Expand Down
3 changes: 3 additions & 0 deletions pkg/names/names_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func TestNames(t *testing.T) {
{"Ecmp", "ECMP", "ecmp", "ecmp"},
{"Ena", "ENA", "ena", "ena"},
{"UUID", "UUID", "uuid", "uuid"},
{"Nat", "NAT", "nat", "nat"},
{"NatGateway", "NATGateway", "natGateway", "nat_gateway"},
{"NativeAuditFieldsIncluded", "NativeAuditFieldsIncluded", "nativeAuditFieldsIncluded", "native_audit_fields_included"},
}
for _, tc := range testCases {
n := names.New(tc.original)
Expand Down

0 comments on commit bbae305

Please sign in to comment.