Skip to content

Commit 21c6d42

Browse files
committed
add IPAM and TPM to initialisms
1 parent 2944c87 commit 21c6d42

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/names/names.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ var (
6666
// prefix-converted (should be "md5OfBody")
6767
{"MD5Of", "MD5Of", "md5Of", regexp.MustCompile("M[dD]5Of", regexp.None)},
6868
// Prevent "MultipartUpload" from becoming "MultIPartUpload"
69-
{"Ip", "IP", "ip", regexp.MustCompile("Ip(?!art)", regexp.None)},
69+
// and "IPAM" from becoming "IPam"
70+
{"Ip", "IP", "ip", regexp.MustCompile("Ip(?!art|am)", regexp.None)},
7071
// Model fields containing AMI will always capitalize the 'A' hence we don't
7172
// have to look for words starting with a lowercase 'A'
7273
{"Amis", "AMIs", "amis", regexp.MustCompile("Amis", regexp.None)},
@@ -110,6 +111,7 @@ var (
110111
// Prevent "IOPS" from becoming "IOps"
111112
{"Io", "IO", "io", regexp.MustCompile("Io(?!ps)", regexp.None)},
112113
{"Iops", "IOPS", "iops", nil},
114+
{"Ipam", "IPAM", "ipam", nil},
113115
{"Json", "JSON", "json", nil},
114116
{"Jwt", "JWT", "jwt", nil},
115117
{"Kms", "KMS", "kms", nil},
@@ -133,6 +135,7 @@ var (
133135
{"Ssl", "SSL", "ssl", nil},
134136
{"Tcp", "TCP", "tcp", nil},
135137
{"Tde", "TDE", "tde", nil},
138+
{"Tpm", "TPM", "tpm", nil},
136139
{"Tls", "TLS", "tls", nil},
137140
{"Udp", "UDP", "udp", nil},
138141
// Need to prevent "security" from becoming "SecURIty"

pkg/names/names_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ func TestNames(t *testing.T) {
5656
{"IoPerformance", "IOPerformance", "ioPerformance", "io_performance"},
5757
{"Iops", "IOPS", "iops", "iops"},
5858
{"Ip", "IP", "ip", "ip"},
59+
{"Ipam", "IPAM", "ipam", "ipam"},
5960
{"Frame", "Frame", "frame", "frame"},
6061
{"KeyId", "KeyID", "keyID", "key_id"},
6162
{"KeyID", "KeyID", "keyID", "key_id"},
@@ -78,6 +79,7 @@ func TestNames(t *testing.T) {
7879
{"Sqs", "SQS", "sqs", "sqs"},
7980
{"SriovNetSupport", "SRIOVNetSupport", "sriovNetSupport", "sriov_net_support"},
8081
{"SSEKMSKeyID", "SSEKMSKeyID", "sseKMSKeyID", "sse_kms_key_id"},
82+
{"Tpm", "TPM", "tpm", "tpm"},
8183
{"UUID", "UUID", "uuid", "uuid"},
8284
{"Vlan", "VLAN", "vlan", "vlan"},
8385
}

0 commit comments

Comments
 (0)