Skip to content

Commit 14ebb07

Browse files
authored
update ami rule in initialisms (#167)
Issue #, if available: N/A Description of changes: * Update `ami` entry to prevent replacement in "Family" Testing: * `make test` ✅ By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 970b729 commit 14ebb07

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/names/names.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ var (
6767
{"MD5Of", "MD5Of", "md5Of", regexp.MustCompile("M[dD]5Of", regexp.None)},
6868
// Prevent "MultipartUpload" from becoming "MultIPartUpload"
6969
{"Ip", "IP", "ip", regexp.MustCompile("Ip(?!art)", regexp.None)},
70+
// Prevent "Family" from becoming "FAMIly"
71+
{"Ami", "AMI", "ami", regexp.MustCompile("(?!f)ami(?!ly)|(Ami)", regexp.None)},
7072
// Easy find-and-replacements...
71-
{"Ami", "AMI", "ami", nil},
7273
{"Acl", "ACL", "acl", nil},
7374
{"Acp", "ACP", "acp", nil},
7475
{"Api", "API", "api", nil},

pkg/names/names_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func TestNames(t *testing.T) {
3535
{"Identifier", "Identifier", "identifier", "identifier"},
3636
{"Id", "ID", "id", "id"},
3737
{"ID", "ID", "id", "id"},
38+
{"Family", "Family", "family", "family"},
3839
{"KeyIdentifier", "KeyIdentifier", "keyIdentifier", "key_identifier"},
3940
{"KeyId", "KeyID", "keyID", "key_id"},
4041
{"KeyID", "KeyID", "keyID", "key_id"},

0 commit comments

Comments
 (0)