Skip to content

Commit

Permalink
trivial: replace x=x+y with x+=y
Browse files Browse the repository at this point in the history
Also organize imports according to the go-import convention used everywhere else
already.
  • Loading branch information
eapache committed May 8, 2015
1 parent 440808c commit ad91627
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions snappy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package sarama

import (
"bytes"
"code.google.com/p/snappy-go/snappy"
"encoding/binary"

"code.google.com/p/snappy-go/snappy"
)

var snappyMagic = []byte{130, 83, 78, 65, 80, 80, 89, 0}
Expand All @@ -25,13 +26,13 @@ func snappyDecode(src []byte) ([]byte, error) {
)
for pos < max {
size := binary.BigEndian.Uint32(src[pos : pos+4])
pos = pos + 4
pos += 4

chunk, err = snappy.Decode(chunk, src[pos:pos+size])
if err != nil {
return nil, err
}
pos = pos + size
pos += size
dst = append(dst, chunk...)
}
return dst, nil
Expand Down

0 comments on commit ad91627

Please sign in to comment.