Summary
Three internal interface naming violations that make the code harder to read.
Findings
1. headerInterface — ends with "Interface"
| Current |
File:Line |
headerInterface |
streaming.go:12 |
Go convention never uses "Interface" as a suffix. Interface names should describe behavior, not the fact that something is an interface.
Suggested: headerReader or headerAccessor (depending on what the interface abstracts).
2. connTLSer — awkward -er suffix
| Current |
File:Line |
connTLSer |
server.go:839 |
Concatenating "conn" + "TLS" + "er" produces an unreadable name. The -er suffix should apply to a verb, not an acronym.
Suggested: tlsHandshaker or tlsConn.
3. connKeepAliveer — double-e from awkward -er suffix
| Current |
File:Line |
connKeepAliveer |
server.go:2054 |
"Alive" + "er" produces a double-e that reads as "Keep-Aliv-ee-er". This violates the spirit of the -er convention.
Suggested: keepAliver or keepAliveConn.
Reference
Summary
Three internal interface naming violations that make the code harder to read.
Findings
1.
headerInterface— ends with "Interface"headerInterfacestreaming.go:12Go convention never uses "Interface" as a suffix. Interface names should describe behavior, not the fact that something is an interface.
Suggested:
headerReaderorheaderAccessor(depending on what the interface abstracts).2.
connTLSer— awkward-ersuffixconnTLSerserver.go:839Concatenating "conn" + "TLS" + "er" produces an unreadable name. The
-ersuffix should apply to a verb, not an acronym.Suggested:
tlsHandshakerortlsConn.3.
connKeepAliveer— double-e from awkward-ersuffixconnKeepAliveerserver.go:2054"Alive" + "er" produces a double-e that reads as "Keep-Aliv-ee-er". This violates the spirit of the
-erconvention.Suggested:
keepAliverorkeepAliveConn.Reference