Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Konovalov committed Nov 5, 2024
1 parent 66ccb74 commit 28a2f93
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (c VshardMode) String() string {
return string(c)
}

type StorageCallAssertErrorResponse struct {
type StorageCallAssertResponseError struct {
Ok bool `msgpack:",omitempty"`
assertError
}
Expand All @@ -42,7 +42,7 @@ type assertError struct {

// DecodeMsgpack is specific method for msgpack decoding,
// cause tarantool vshard error responses as 2 values array
func (s *StorageCallAssertErrorResponse) DecodeMsgpack(d *msgpack.Decoder) error {
func (s *StorageCallAssertResponseError) DecodeMsgpack(d *msgpack.Decoder) error {
var ok bool

arrayLen, err := d.DecodeArrayLen()
Expand Down Expand Up @@ -80,8 +80,8 @@ func (s *StorageCallAssertErrorResponse) DecodeMsgpack(d *msgpack.Decoder) error
return nil
}

func (s StorageCallAssertErrorResponse) Error() string {
type alias StorageCallAssertErrorResponse
func (s StorageCallAssertResponseError) Error() string {
type alias StorageCallAssertResponseError
return fmt.Sprintf("%+v", alias(s))
}

Expand Down Expand Up @@ -239,7 +239,7 @@ func (r *Router) RouterCallImpl(ctx context.Context,
}
}

var assError StorageCallAssertErrorResponse
var assError StorageCallAssertResponseError

err = future.GetTyped(&assError)
if err != nil {
Expand Down Expand Up @@ -393,7 +393,7 @@ func (r *Router) RouterMapCallRWImpl(
return nil, fmt.Errorf("protocol violation: invalid respData length when respData[0] == nil, must be = 2, current: %d", len(respData))
}

var assertError StorageCallAssertErrorResponse
var assertError StorageCallAssertResponseError
err = mapstructure.Decode(respData[1], &assertError)
if err != nil {
// We could not decode respData[1] as assertError, so return respData[1] as is, add info why we could not decode.
Expand Down

0 comments on commit 28a2f93

Please sign in to comment.