File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -117,8 +117,6 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6
117117github.com/jcmturner/gokrb5/v8 v8.4.4 /go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs =
118118github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY =
119119github.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 =
122120github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 /go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes =
123121github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA =
124122github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 /go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8 =
Original file line number Diff line number Diff line change @@ -2,8 +2,10 @@ package qrouter
22
33import (
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
1920type LocalQrouter struct {
@@ -38,8 +39,7 @@ var _ QueryRouter = &LocalQrouter{}
3839
3940func 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 }
You can’t perform that action at this time.
0 commit comments