Skip to content

Commit 4a393cc

Browse files
xelavopelkKlepov Alex
andauthored
Remove redundant juju/errors (#1574)
Co-authored-by: Klepov Alex <aklepov@rutube.ru>
1 parent b3e1310 commit 4a393cc

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ require (
1515
github.com/jackc/pgx/v5 v5.7.6
1616
github.com/jcmturner/gofork v1.7.6
1717
github.com/jcmturner/gokrb5/v8 v8.4.4
18-
github.com/juju/errors v1.0.0
1918
github.com/lib/pq v1.10.9
2019
github.com/libp2p/go-reuseport v0.4.0
2120
github.com/opentracing/opentracing-go v1.2.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6
117117
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
118118
github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY=
119119
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
120-
github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM=
121-
github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8=
122120
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
123121
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
124122
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=

router/qrouter/local.go

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

33
import (
44
"context"
5+
"fmt"
6+
7+
"sync/atomic"
58

6-
"github.com/juju/errors"
79
"github.com/pg-sharding/lyx/lyx"
810
"github.com/pg-sharding/spqr/pkg/config"
911
"github.com/pg-sharding/spqr/pkg/meta"
@@ -13,7 +15,6 @@ import (
1315
"github.com/pg-sharding/spqr/pkg/spqrlog"
1416
"github.com/pg-sharding/spqr/router/cache"
1517
"github.com/pg-sharding/spqr/router/plan"
16-
"sync/atomic"
1718
)
1819

1920
type LocalQrouter struct {
@@ -38,8 +39,7 @@ var _ QueryRouter = &LocalQrouter{}
3839

3940
func NewLocalQrouter(shardMapping map[string]*config.Shard) (*LocalQrouter, error) {
4041
if len(shardMapping) != 1 {
41-
errmsg := "local router support only single-datashard routing"
42-
err := errors.New(errmsg)
42+
err := fmt.Errorf("local router support only single-datashard routing")
4343
spqrlog.Zero.Error().Err(err).Msg("")
4444
return nil, err
4545
}

0 commit comments

Comments
 (0)