From 10ad7bbe8cc84a8cd11334fdf5eb988795e0f94e Mon Sep 17 00:00:00 2001 From: Brabem <2198702716@qq.com> Date: Thu, 18 Jan 2024 20:51:51 +0800 Subject: [PATCH] fix: fix the error format --- internal/api/msg.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index 9f16ec9c2..ff6ab243c 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -16,6 +16,7 @@ package api import ( "encoding/json" + "errors" "fmt" "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" @@ -542,7 +543,7 @@ func convertStructToMap(input interface{}) (map[string]interface{}, error) { inputValue := reflect.ValueOf(input) if inputType.Kind() != reflect.Struct { - return nil, errs.ErrArgs.Wrap("Input is not a struct") + return nil, errors.New("input is not a struct") } for i := 0; i < inputType.NumField(); i++ {