Skip to content

Commit

Permalink
GOCBC-1244: Update dependencies
Browse files Browse the repository at this point in the history
Motivation
----------
A vulnerability scan has highlighted that we have
a few dependencies that have new releases.

Changes
--------
Update dependencies.
Remove github.com/pkg/errors dependency as we don't
actually need it.
Change-Id: I987bd4669e445216d2002557225515c1d16940a2
Reviewed-on: https://review.couchbase.org/c/gocb/+/171181
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Charles Dixon <chvckd@gmail.com>
  • Loading branch information
chvck committed Feb 23, 2022
1 parent bade334 commit 30b516a
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 32 deletions.
2 changes: 1 addition & 1 deletion bucket_collectionsmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package gocb
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/url"
"strings"
"time"

"github.com/google/uuid"
"github.com/pkg/errors"

"github.com/couchbase/gocbcore/v10"
)
Expand Down
2 changes: 1 addition & 1 deletion bucket_ping_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package gocb

import (
"errors"
"time"

"github.com/stretchr/testify/mock"

gocbcore "github.com/couchbase/gocbcore/v10"
"github.com/pkg/errors"
)

func (suite *UnitTestSuite) TestPingAll() {
Expand Down
3 changes: 1 addition & 2 deletions bucket_viewindexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package gocb
import (
"context"
"encoding/json"
"errors"
"fmt"
"github.com/google/uuid"
"io/ioutil"
"strings"
"time"

"github.com/pkg/errors"
)

// DesignDocumentNamespace represents which namespace a design document resides in.
Expand Down
4 changes: 2 additions & 2 deletions bucket_viewquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package gocb
import (
"context"
"encoding/json"
"errors"
"net/url"
"strings"
"time"

gocbcore "github.com/couchbase/gocbcore/v10"
"github.com/pkg/errors"
)

type jsonViewResponse struct {
Expand Down Expand Up @@ -243,7 +243,7 @@ func (b *Bucket) ViewQuery(designDoc string, viewName string, opts *ViewOptions)

urlValues, err := opts.toURLValues()
if err != nil {
return nil, errors.Wrap(err, "could not parse query options")
return nil, wrapError(err, "could not parse query options")
}

return b.execViewQuery(opts.Context, span.Context(), "_view", designDoc, viewName, *urlValues, deadline,
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package gocb

import (
"crypto/x509"
"errors"
"github.com/couchbase/gocbcore/v10"
"github.com/pkg/errors"
"sync"
)

Expand Down
2 changes: 1 addition & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package gocb
import (
"context"
"crypto/x509"
"errors"
"fmt"
"strconv"
"time"

gocbcore "github.com/couchbase/gocbcore/v10"
gocbconnstr "github.com/couchbase/gocbcore/v10/connstr"
"github.com/pkg/errors"
)

// Cluster represents a connection to a specific Couchbase cluster.
Expand Down
2 changes: 1 addition & 1 deletion cluster_bucketmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package gocb
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/url"
"strings"
"time"

"github.com/google/uuid"
"github.com/pkg/errors"
)

// BucketType specifies the kind of bucket.
Expand Down
2 changes: 1 addition & 1 deletion cluster_ping_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package gocb

import (
"errors"
"time"

"github.com/stretchr/testify/mock"

gocbcore "github.com/couchbase/gocbcore/v10"
"github.com/pkg/errors"
)

func (suite *IntegrationTestSuite) TestClusterPingAll() {
Expand Down
3 changes: 1 addition & 2 deletions cluster_searchindexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package gocb
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"strings"
"time"

"github.com/pkg/errors"
)

type jsonSearchIndexResp struct {
Expand Down
2 changes: 1 addition & 1 deletion cluster_usermgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package gocb
import (
"context"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/url"
"strings"
"time"

"github.com/google/uuid"
"github.com/pkg/errors"
)

// AuthDomain specifies the user domain of a specific user
Expand Down
2 changes: 1 addition & 1 deletion error_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package gocb

import (
"encoding/json"
"errors"
"github.com/couchbase/gocbcore/v10"
"github.com/pkg/errors"
"io/ioutil"
)

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/couchbase/gocb/v2
require (
github.com/couchbase/gocbcore/v10 v10.1.0
github.com/couchbaselabs/gocaves/client v0.0.0-20211209113245-27e13f721acf
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.1.1
github.com/pkg/errors v0.9.1
github.com/stretchr/objx v0.1.1 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

go 1.13
16 changes: 9 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@ github.com/couchbaselabs/gocaves/client v0.0.0-20211209113245-27e13f721acf/go.mo
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.3.0 h1:NGXK3lHquSN08v5vWalVI/L8XU9hdzE/G6xsrze47As=
github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 1 addition & 2 deletions kvopmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package gocb

import (
"context"
"errors"
"time"

gocbcore "github.com/couchbase/gocbcore/v10"
"github.com/couchbase/gocbcore/v10/memd"

"github.com/pkg/errors"
)

type kvOpManager struct {
Expand Down
6 changes: 2 additions & 4 deletions results.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package gocb
import (
"encoding/json"
"time"

"github.com/pkg/errors"
)

// Result is the base type for the return types of operations
Expand Down Expand Up @@ -85,7 +83,7 @@ func (d *GetResult) fromFullProjection(ops []LookupInSpec, result *LookupInResul

bytes, err := json.Marshal(newContent)
if err != nil {
return errors.Wrap(err, "could not marshal result contents")
return wrapError(err, "could not marshal result contents")
}
d.contents = bytes

Expand All @@ -109,7 +107,7 @@ func (d *GetResult) fromSubDoc(ops []LookupInSpec, result *LookupInResult) error

bytes, err := json.Marshal(content)
if err != nil {
return errors.Wrap(err, "could not marshal result contents")
return wrapError(err, "could not marshal result contents")
}
d.contents = bytes

Expand Down
2 changes: 1 addition & 1 deletion transcoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package gocb

import (
"encoding/json"
"errors"

gocbcore "github.com/couchbase/gocbcore/v10"
"github.com/pkg/errors"
)

// Transcoder provides an interface for transforming Go values to and
Expand Down

0 comments on commit 30b516a

Please sign in to comment.