Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPAM and TPM to initialisms #365

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/names/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ var (
// prefix-converted (should be "md5OfBody")
{"MD5Of", "MD5Of", "md5Of", regexp.MustCompile("M[dD]5Of", regexp.None)},
// Prevent "MultipartUpload" from becoming "MultIPartUpload"
{"Ip", "IP", "ip", regexp.MustCompile("Ip(?!art)", regexp.None)},
// and "IPAM" from becoming "IPam"
{"Ip", "IP", "ip", regexp.MustCompile("Ip(?!art|am)", regexp.None)},
// Model fields containing AMI will always capitalize the 'A' hence we don't
// have to look for words starting with a lowercase 'A'
{"Amis", "AMIs", "amis", regexp.MustCompile("Amis", regexp.None)},
Expand Down Expand Up @@ -110,6 +111,7 @@ var (
// Prevent "IOPS" from becoming "IOps"
{"Io", "IO", "io", regexp.MustCompile("Io(?!ps)", regexp.None)},
{"Iops", "IOPS", "iops", nil},
{"Ipam", "IPAM", "ipam", nil},
{"Json", "JSON", "json", nil},
{"Jwt", "JWT", "jwt", nil},
{"Kms", "KMS", "kms", nil},
Expand All @@ -133,6 +135,7 @@ var (
{"Ssl", "SSL", "ssl", nil},
{"Tcp", "TCP", "tcp", nil},
{"Tde", "TDE", "tde", nil},
{"Tpm", "TPM", "tpm", nil},
{"Tls", "TLS", "tls", nil},
{"Udp", "UDP", "udp", nil},
// Need to prevent "security" from becoming "SecURIty"
Expand Down
2 changes: 2 additions & 0 deletions pkg/names/names_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func TestNames(t *testing.T) {
{"IoPerformance", "IOPerformance", "ioPerformance", "io_performance"},
{"Iops", "IOPS", "iops", "iops"},
{"Ip", "IP", "ip", "ip"},
{"Ipam", "IPAM", "ipam", "ipam"},
{"Frame", "Frame", "frame", "frame"},
{"KeyId", "KeyID", "keyID", "key_id"},
{"KeyID", "KeyID", "keyID", "key_id"},
Expand All @@ -78,6 +79,7 @@ func TestNames(t *testing.T) {
{"Sqs", "SQS", "sqs", "sqs"},
{"SriovNetSupport", "SRIOVNetSupport", "sriovNetSupport", "sriov_net_support"},
{"SSEKMSKeyID", "SSEKMSKeyID", "sseKMSKeyID", "sse_kms_key_id"},
{"Tpm", "TPM", "tpm", "tpm"},
{"UUID", "UUID", "uuid", "uuid"},
{"Vlan", "VLAN", "vlan", "vlan"},
}
Expand Down