Skip to content

Commit

Permalink
enhance: Add depguard rules to ban deprecated proto lib (#35140)
Browse files Browse the repository at this point in the history
See also #34394 #34252

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Aug 1, 2024
1 parent c15d074 commit dfda9f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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$'
Expand Down
2 changes: 1 addition & 1 deletion pkg/streaming/util/message/message_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit dfda9f0

Please sign in to comment.