enhance: Add lint rule to forbid gogo protobuf (#34594)

github.com/gogo/protobuf is deprecated and could be error prune after
upgrade protobuf message to v2.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/34629/head
congqixia 2024-07-12 10:19:35 +08:00 committed by GitHub
parent f00c529aea
commit 531092c031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -121,6 +121,8 @@ linters-settings:
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
- pkg: "github.com/tikv/client-go/v2/rawkv"
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
- pkg: "github.com/gogo/protobuf"
desc: "not allowed, gogo protobuf is deprecated"
forbidigo:
forbid:
- '^time\.Tick$'

View File

@ -27,7 +27,7 @@ import (
"time"
"github.com/cockroachdb/errors"
"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/proto"
"github.com/samber/lo"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"

View File

@ -20,7 +20,7 @@ import (
"encoding/binary"
"fmt"
"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/proto"
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
"github.com/milvus-io/milvus/pkg/common"