Skip to content

fix: improve internal interface naming (headerInterface, connTLSer, connKeepAliveer) #2229

Description

@pageton

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions