Skip to content

Commit

Permalink
enhance: Add depguard rules to ban deprecated proto lib (milvus-io#35140
Browse files Browse the repository at this point in the history
)

See also milvus-io#34394 milvus-io#34252

Co-authored-by: Congqi Xia <[email protected]>
Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
congqixia authored and weiliu1031 committed Aug 29, 2024
1 parent fedf3a7 commit 34b2efe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ linters-settings:
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
- pkg: "github.com/gogo/protobuf"
desc: "not allowed, gogo protobuf is deprecated"
- pkg: "github.com/golang/protobuf/proto"
desc: "not allowed, protobuf v1 is deprecated, use google.golang.org/protobuf/proto instead"
forbidigo:
forbid:
- '^time\.Tick$'
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/go-playground/validator/v10 v10.14.0
github.com/gofrs/flock v0.8.1
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.2
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/klauspost/compress v1.17.7
Expand Down
2 changes: 1 addition & 1 deletion internal/proxy/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"time"

"github.com/cockroachdb/errors"
"github.com/golang/protobuf/proto"
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/proto"

"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/levelzero/delete_on_growing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"
"time"

"github.com/golang/protobuf/proto"
"go.uber.org/zap"
"google.golang.org/protobuf/proto"

"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
Expand Down

0 comments on commit 34b2efe

Please sign in to comment.