|
44 | 44 | // camel-cased "Ids" refers to a set of Identifiers, so the correct
|
45 | 45 | // uppercase representation is "IDs"
|
46 | 46 | {"Ids", "IDs", "ids", nil},
|
47 |
| - // Need to prevent "Identifier" from becoming "IDentifier", |
48 |
| - // and "Idle" from becoming "IDle" |
49 |
| - {"Id", "ID", "id", regexp.MustCompile("Id(?!entifier|le|entity)", regexp.None)}, |
| 47 | + // Need to prevent "Identifier" from becoming "IDentifier", and "Idle" |
| 48 | + // from becoming "IDle" and "IdempotencyToken" from becoming |
| 49 | + // "IDempotencyToken" |
| 50 | + {"Id", "ID", "id", regexp.MustCompile("Id(?!entifier|le|entity|empotency)", regexp.None)}, |
50 | 51 | // Need to prevent "DbInstance" from becoming "dbinstance" when lower
|
51 | 52 | // prefix-converted (should be dbInstance). Amazingly, even within just
|
52 | 53 | // the RDS API, there are fields named "DbiResourceId",
|
@@ -120,6 +121,8 @@ var (
|
120 | 121 | {"Mfa", "MFA", "mfa", nil},
|
121 | 122 | // Prevent "Native" from becoming "NATive"
|
122 | 123 | {"Nat", "NAT", "nat", regexp.MustCompile("Nat(?!i)", regexp.None)},
|
| 124 | + // Prevent Oid from becoming oID |
| 125 | + {"Oid", "OID", "oid", nil}, |
123 | 126 | {"Oidc", "OIDC", "oidc", nil},
|
124 | 127 | {"Ocsp", "OCSP", "ocsp", nil},
|
125 | 128 | // Capitalize the 'd' following RAM in certain cases
|
@@ -229,7 +232,8 @@ func goName(original string, lowerFirst bool, snake bool) (result string) {
|
229 | 232 | //
|
230 | 233 | // Examples:
|
231 | 234 | //
|
232 |
| -// original | lowerFirst | output |
| 235 | +// original | lowerFirst | output |
| 236 | +// |
233 | 237 | // ------------+ ---------- + -------------------------
|
234 | 238 | // Identifier | true | Identifier
|
235 | 239 | // Identifier | false | Identifier
|
|
0 commit comments