enhance: Add depguard rules to ban deprecated proto lib (#35140)

See also #34394 #34252

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2024-08-01 10:01:49 +08:00 committed by GitHub
parent c15d074b21
commit dfda9f0478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -123,6 +123,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$'

View File

@ -5,8 +5,8 @@ import (
"fmt"
"testing"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
"google.golang.org/protobuf/proto"
"github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
"github.com/milvus-io/milvus/pkg/mocks/streaming/util/mock_message"

View File

@ -20,9 +20,9 @@ import (
"context"
"time"
"github.com/golang/protobuf/proto"
"github.com/samber/lo"
"go.uber.org/zap"
"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"