Skip to content

Commit fbdf101

Browse files
author
Hongyu Zhou
committed
use klauspost/pgzip
1 parent caa8463 commit fbdf101

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/google/uuid v1.1.2
1616
github.com/gorilla/mux v1.7.3
1717
github.com/julienschmidt/httprouter v1.2.0
18-
github.com/klauspost/compress v1.16.7
18+
github.com/klauspost/pgzip v1.2.6
1919
github.com/maxbrunsfeld/counterfeiter/v6 v6.4.1
2020
github.com/pkg/errors v0.9.1
2121
github.com/segmentio/cli v0.5.1
@@ -45,6 +45,7 @@ require (
4545
github.com/aws/smithy-go v1.13.5 // indirect
4646
github.com/davecgh/go-spew v1.1.1 // indirect
4747
github.com/jmespath/go-jmespath v0.4.0 // indirect
48+
github.com/klauspost/compress v1.16.7 // indirect
4849
github.com/mdlayher/genetlink v0.0.0-20190313224034-60417448a851 // indirect
4950
github.com/mdlayher/netlink v0.0.0-20190313131330-258ea9dff42c // indirect
5051
github.com/mdlayher/taskstats v0.0.0-20190313225729-7cbba52ee072 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+
7777
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
7878
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
7979
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
80+
github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU=
81+
github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
8082
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
8183
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
8284
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=

pkg/reflector/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package reflector
22

33
import (
44
"bytes"
5-
"compress/gzip"
65
"context"
76
"fmt"
87
"io"
@@ -16,6 +15,7 @@ import (
1615
"github.com/aws/aws-sdk-go-v2/feature/s3/manager"
1716
"github.com/aws/aws-sdk-go-v2/service/s3"
1817
"github.com/aws/aws-sdk-go/aws/awserr"
18+
gzip "github.com/klauspost/pgzip"
1919

2020
"github.com/segmentio/ctlstore/pkg/errs"
2121
"github.com/segmentio/errors-go"

pkg/reflector/download_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package reflector_test
22

33
import (
44
"bytes"
5-
"compress/gzip"
6-
"github.com/aws/aws-sdk-go/aws/awserr"
75
"io"
86
"io/ioutil"
97
"math/rand"
@@ -12,11 +10,13 @@ import (
1210
"testing"
1311

1412
"github.com/aws/aws-sdk-go-v2/service/s3"
15-
//"github.com/aws/aws-sdk-go/aws/awserr"
13+
"github.com/aws/aws-sdk-go/aws/awserr"
14+
gzip "github.com/klauspost/pgzip"
15+
"github.com/stretchr/testify/require"
16+
1617
"github.com/segmentio/ctlstore/pkg/fakes"
1718
"github.com/segmentio/ctlstore/pkg/reflector"
1819
"github.com/segmentio/errors-go"
19-
"github.com/stretchr/testify/require"
2020
)
2121

2222
// Verifies error handling behavior when downloading from s3 fails.

0 commit comments

Comments
 (0)