Skip to content

Commit

Permalink
fix: tweak
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Aug 13, 2020
1 parent 7e0d325 commit 2339790
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/compress/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewGzip(opts ...GzipOption) (Compressor, error) {
return c, nil
}

// CompressVector Compress the data and returns an error if compression fails
// CompressVector Compress the data and returns an error if compression fails.
func (g *gzipCompressor) CompressVector(vector []float32) ([]byte, error) {
buf := new(bytes.Buffer)
gw, err := g.builder.NewWriterLevel(buf, g.compressionLevel)
Expand All @@ -72,7 +72,7 @@ func (g *gzipCompressor) CompressVector(vector []float32) ([]byte, error) {
return buf.Bytes(), nil
}

// CompressVector Decompress the compressed data and returns an error if decompression fails
// CompressVector Decompress the compressed data and returns an error if decompression fails.
func (g *gzipCompressor) DecompressVector(bs []byte) ([]float32, error) {
buf := new(bytes.Buffer)
gr, err := g.builder.NewReader(bytes.NewBuffer(bs))
Expand Down
2 changes: 1 addition & 1 deletion internal/compress/gzip/gzip.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/klauspost/compress/gzip"
)

// These constants are copied from the gzip package
// These constants are copied from the gzip package.
const (
NoCompression = gzip.NoCompression
BestSpeed = gzip.BestSpeed
Expand Down
2 changes: 1 addition & 1 deletion internal/compress/gzip/gzip_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gzip

import "io"

// MockReader represents mock of Reader
// MockReader represents mock of Reader.
type MockReader struct {
ReadFunc func(p []byte) (n int, err error)
CloseFunc func() error
Expand Down
2 changes: 1 addition & 1 deletion internal/compress/lz4/lz4_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type MockReader struct {
ReadFunc func(p []byte) (n int, err error)
}

// Read calls ReadFunc
// Read calls ReadFunc.
func (m *MockReader) Read(p []byte) (n int, err error) {
return m.ReadFunc(p)
}
Expand Down

0 comments on commit 2339790

Please sign in to comment.