Skip to content

Commit bbae305

Browse files
authored
add NAT to initialisms (#245)
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.
1 parent 25c43e8 commit bbae305

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/names/names.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ var (
109109
{"Kms", "KMS", "kms", nil},
110110
{"Ldap", "LDAP", "ldap", nil},
111111
{"Mfa", "MFA", "mfa", nil},
112+
// Prevent "Native" from becoming "NATive"
113+
{"Nat", "NAT", "nat", regexp.MustCompile("Nat(?!i)", regexp.None)},
112114
{"Oidc", "OIDC", "oidc", nil},
113115
{"Sdk", "SDK", "sdk", nil},
114116
{"Sha256", "SHA256", "sha256", nil},

pkg/names/names_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ func TestNames(t *testing.T) {
6767
{"Ecmp", "ECMP", "ecmp", "ecmp"},
6868
{"Ena", "ENA", "ena", "ena"},
6969
{"UUID", "UUID", "uuid", "uuid"},
70+
{"Nat", "NAT", "nat", "nat"},
71+
{"NatGateway", "NATGateway", "natGateway", "nat_gateway"},
72+
{"NativeAuditFieldsIncluded", "NativeAuditFieldsIncluded", "nativeAuditFieldsIncluded", "native_audit_fields_included"},
7073
}
7174
for _, tc := range testCases {
7275
n := names.New(tc.original)

0 commit comments

Comments
 (0)