Combine const declarations into one block

This commit is contained in:
Justin Nuß
2015-10-07 06:37:58 +02:00
parent 5165699f37
commit e2cb78fabb

View File

@ -138,8 +138,10 @@ type msgFixedHeader struct {
// EOF is returned with nil msg and 0 pf if the entire stream is done. Other
// non-nil error is returned if something is wrong on reading.
func (p *parser) recvMsg() (pf payloadFormat, msg []byte, err error) {
const headerSize = 5
const formatIndex = 1
const (
headerSize = 5
formatIndex = 1
)
var hdr msgFixedHeader
var buf [headerSize]byte