Skip to content

Commit

Permalink
api: address revive unexported-return issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Valdes <ivan@vald.es>
  • Loading branch information
ivanvc committed Oct 3, 2024
1 parent c1976a6 commit 3654d03
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api/etcdserverpb/raft_internal_stringer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ func (as *InternalRaftStringer) String() string {
return as.Request.String()
}

// txnRequestStringer implements a custom proto String to replace value bytes fields with value size
// fields in any nested txn and put operations.
// txnRequestStringer implements fmt.Stringer, a custom proto String to replace value bytes
// fields with value size fields in any nested txn and put operations.
type txnRequestStringer struct {
Request *TxnRequest
}

func NewLoggableTxnRequest(request *TxnRequest) *txnRequestStringer {
func NewLoggableTxnRequest(request *TxnRequest) fmt.Stringer {
return &txnRequestStringer{request}
}

Expand Down Expand Up @@ -155,8 +155,8 @@ func (m *loggableValueCompare) Reset() { *m = loggableValueCompare{} }
func (m *loggableValueCompare) String() string { return proto.CompactTextString(m) }
func (*loggableValueCompare) ProtoMessage() {}

// loggablePutRequest implements a custom proto String to replace value bytes field with a value
// size field.
// loggablePutRequest implements proto.Message, a custom proto String to replace value bytes
// field with a value size field.
// To preserve proto encoding of the key bytes, a faked out proto type is used here.
type loggablePutRequest struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3"`
Expand All @@ -167,7 +167,7 @@ type loggablePutRequest struct {
IgnoreLease bool `protobuf:"varint,6,opt,name=ignore_lease,proto3"`
}

func NewLoggablePutRequest(request *PutRequest) *loggablePutRequest {
func NewLoggablePutRequest(request *PutRequest) proto.Message {
return &loggablePutRequest{
request.Key,
int64(len(request.Value)),
Expand Down

0 comments on commit 3654d03

Please sign in to comment.