mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-05 12:02:25 +08:00
fix: fix the error format
This commit is contained in:
parent
f814430be6
commit
10ad7bbe8c
@ -16,6 +16,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/OpenIMSDK/protocol/constant"
|
"github.com/OpenIMSDK/protocol/constant"
|
||||||
"github.com/OpenIMSDK/protocol/msg"
|
"github.com/OpenIMSDK/protocol/msg"
|
||||||
@ -542,7 +543,7 @@ func convertStructToMap(input interface{}) (map[string]interface{}, error) {
|
|||||||
inputValue := reflect.ValueOf(input)
|
inputValue := reflect.ValueOf(input)
|
||||||
|
|
||||||
if inputType.Kind() != reflect.Struct {
|
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++ {
|
for i := 0; i < inputType.NumField(); i++ {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user