Skip to content

Commit ce11b7f

Browse files
jacobbednarzmholt
authored andcommitted
Update common initialisms list (#48)
Adds ACL, SQL and XMPP to match upstream golint list.
1 parent fb4ffe9 commit ce11b7f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

json-to-go.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@ function jsonToGo(json, typename, flatten = true)
287287
// Proper cases a string according to Go conventions
288288
function toProperCase(str)
289289
{
290-
// https://github.com/golang/lint/blob/39d15d55e9777df34cdffde4f406ab27fd2e60c0/lint.go#L695-L731
290+
// https://github.com/golang/lint/blob/5614ed5bae6fb75893070bdc0996a68765fdd275/lint.go#L771-L810
291291
const commonInitialisms = [
292-
"API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP",
293-
"HTTPS", "ID", "IP", "JSON", "LHS", "QPS", "RAM", "RHS", "RPC", "SLA",
294-
"SMTP", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "UID", "UUID", "URI",
295-
"URL", "UTF8", "VM", "XML", "XSRF", "XSS"
292+
"ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP",
293+
"HTTPS", "ID", "IP", "JSON", "LHS", "QPS", "RAM", "RHS", "RPC", "SLA",
294+
"SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "UID", "UUID",
295+
"URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS"
296296
];
297297

298298
return str.replace(/(^|[^a-zA-Z])([a-z]+)/g, function(unused, sep, frag)
@@ -320,4 +320,4 @@ if (typeof module != 'undefined') {
320320
} else {
321321
module.exports = jsonToGo
322322
}
323-
}
323+
}

0 commit comments

Comments
 (0)