Adhere to Go's standard naming conventions for identifiers: 1. **Control visibility with capitalization**: - Use uppercase first letter for exported (public) identifiers
Adhere to Go’s standard naming conventions for identifiers:
HTTP
, TCP
, TLS
, not Http
, Tcp
, Tls
)Example of improper naming:
type TcpHttpTunnelProxy struct {
// ...
}
var ResponseHeaderTimeout int64
var TlsVerify bool
type BaseAuth struct {
// Not needed outside package
}
Example of proper naming:
type TCPHTTPTunnelProxy struct {
// ...
}
var responseHeaderTimeout int64
var TLSVerify bool
type baseAuth struct {
// Not exported as it's only used within the package
}
Following these conventions improves code readability, maintains consistency with standard Go code, and makes the public API of your package more obvious.
Enter the URL of a public GitHub repository