[#28] Replace interface{} with any

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-05-15 17:25:04 +03:00
parent e9e7901f67
commit a3a5046ecc
8 changed files with 14 additions and 14 deletions

View file

@ -1,4 +1,4 @@
package grpc
// Message represents raw gRPC message.
type Message interface{}
type Message any

View file

@ -26,12 +26,12 @@ type Message interface {
// ErrUnexpectedMessageType is an error that
// is used to indicate message mismatch.
type ErrUnexpectedMessageType struct {
exp, act interface{}
exp, act any
}
// NewUnexpectedMessageType initializes an error about message mismatch
// between act and exp.
func NewUnexpectedMessageType(act, exp interface{}) ErrUnexpectedMessageType {
func NewUnexpectedMessageType(act, exp any) ErrUnexpectedMessageType {
return ErrUnexpectedMessageType{
exp: exp,
act: act,