Initialisms - Never Mixed Case
Initialisms should be written either in all upper or all lower case, never mixed.
If the initialism is the prefix of an unexported function, method, variable, constant, or type (thing), it the initialism should be written in all lower case, otherwise it should be all uppercase.
Try to name the thing to avoid having two adjacent initialisms, but if you can’t, the rules above apply to them independently.
Examples
initialisms.go
1var nbnClient = "okay" // not exported with initialism as prefix should be lower case
2var NBNClient = "okay" // exported with initialism as prefix should be upper case
3var NbnClient = "not okay" // exported with initialism as prefix should not be mixed case
4var mobileSIMSerial = "okay" // not exported with initialisms in middle should be upper case
5var mobileSimSerial = "not okay" // not exported with initialisms in middle should be not be mixed case
6
7var NBNTC4Client = "okay" // exported with adjacent initialisms as prefix should have mixed case
8var nbnTC4Client = "okay" // not exported with adjacent initialisms as prefix should have the first in lower and subsequent in upper case
9var nbntc4Client = "not okay" // prefix, adjacent, not exported lower + lower case
10
11var requestID = "okay" // not exported with initialism outside the prefix should be upper case
12var RequestID = "okay" // exported with initialism outside the prefix should be upper case
13var RequestId = "no okay" // exported with initialism outside the prefix should not be mixed case
14var requestId = "no okay" // not exported with initialism outside the prefix should not be mixed case
15var requestid = "no okay" // not exported with initialism outside the prefix should not lower case
16var Requestid = "no okay" // exported with initialism outside the prefix should not lower case