Skip to content

Commit d7d3b19

Browse files
committed
Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <[email protected]>
1 parent 134f99e commit d7d3b19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func (w *packetWriter) Bytes() ([]byte, error) {
198198
return (w.wb.Bytes())[:len], nil
199199
}
200200

201-
// WriteInt appends the byte of b to the inner buffer, growing the buffer as
201+
// WriteByte appends the byte of b to the inner buffer, growing the buffer as
202202
// needed.
203203
func (w *packetWriter) WriteByte(b byte) {
204204
if w.err != nil {
@@ -307,7 +307,7 @@ func (r *packetReader) ReadByte() byte {
307307
return b
308308
}
309309

310-
// Read reads structured binary data from r into data.
310+
// ReadInt reads reads structured binary data from r into data.
311311
// Data must be a pointer to a fixed-size value or a slice
312312
// of fixed-size values.
313313
// Bytes read from r are decoded using the specified byte order

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type Handler interface {
5959
// after sending back the corresponding response.
6060
type HandlerFunc func(*Response, *Packet, *log.Logger) (bool, error)
6161

62-
// ServeHTTP calls f(r, p).
62+
// ServeCmpp calls f(r, p).
6363
func (f HandlerFunc) ServeCmpp(r *Response, p *Packet, l *log.Logger) (bool, error) {
6464
return f(r, p, l)
6565
}

0 commit comments

Comments
 (0)