mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
feat: format openim code
This commit is contained in:
parent
c1626947fc
commit
20b8a7cc10
@ -159,7 +159,7 @@ func (g GrpcHandler) SendMessage(ctx context.Context, data *Req) ([]byte, error)
|
|||||||
|
|
||||||
c, err := proto.Marshal(resp)
|
c, err := proto.Marshal(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errs.Wrap(err, "error marshalling response")
|
return nil, errs.Wrap(err, "error marshaling response")
|
||||||
}
|
}
|
||||||
|
|
||||||
return c, nil
|
return c, nil
|
||||||
@ -172,7 +172,7 @@ func (g GrpcHandler) SendSignalMessage(context context.Context, data *Req) ([]by
|
|||||||
}
|
}
|
||||||
c, err := proto.Marshal(resp)
|
c, err := proto.Marshal(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errs.Wrap(err, "error marshalling response")
|
return nil, errs.Wrap(err, "error marshaling response")
|
||||||
}
|
}
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,5 +24,3 @@ const (
|
|||||||
RpcThirdServer = "third"
|
RpcThirdServer = "third"
|
||||||
RpcUserServer = "user"
|
RpcUserServer = "user"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,11 +17,13 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/openimsdk/open-im-server/v3/internal/msggateway"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"github.com/openimsdk/open-im-server/v3/internal/msggateway"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/protocol/constant"
|
"github.com/OpenIMSDK/protocol/constant"
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
|
|
||||||
v3config "github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
v3config "github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -150,7 +150,7 @@ func (r *RootCmd) getPortFlag(cmd *cobra.Command) (int, error) {
|
|||||||
return port, nil
|
return port, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// // GetPortFlag returns the port flag
|
// // GetPortFlag returns the port flag.
|
||||||
func (r *RootCmd) GetPortFlag() (int, error) {
|
func (r *RootCmd) GetPortFlag() (int, error) {
|
||||||
return r.port, nil
|
return r.port, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ package convert
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/protocol/sdkws"
|
"github.com/OpenIMSDK/protocol/sdkws"
|
||||||
|
|
||||||
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
|
relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
package discoveryregister
|
package discoveryregister
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
"errors"
|
"errors"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/direct"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/direct"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user