style: add format

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-07-03 16:29:22 +08:00
parent 187ee9a375
commit 166ddb1e34
170 changed files with 4816 additions and 1279 deletions
+2 -1
View File
@@ -3,8 +3,9 @@ package cmd
import (
"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway"
//"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/spf13/cobra"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
)
type MsgGatewayCmd struct {
+2 -1
View File
@@ -1,8 +1,9 @@
package cmd
import (
"github.com/OpenIMSDK/Open-IM-Server/internal/msgtransfer"
"github.com/spf13/cobra"
"github.com/OpenIMSDK/Open-IM-Server/internal/msgtransfer"
)
type MsgTransferCmd struct {
+2 -1
View File
@@ -1,8 +1,9 @@
package cmd
import (
"github.com/OpenIMSDK/Open-IM-Server/internal/tools"
"github.com/spf13/cobra"
"github.com/OpenIMSDK/Open-IM-Server/internal/tools"
)
type MsgUtilsCmd struct {
+2 -1
View File
@@ -3,10 +3,11 @@ package cmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/spf13/cobra"
)
type RootCmd struct {
+7 -3
View File
@@ -3,10 +3,11 @@ package cmd
import (
"errors"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc"
)
type RpcCmd struct {
@@ -26,7 +27,10 @@ func (a *RpcCmd) Exec() error {
return a.Execute()
}
func (a *RpcCmd) StartSvr(name string, rpcFn func(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error) error {
func (a *RpcCmd) StartSvr(
name string,
rpcFn func(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error,
) error {
if a.GetPortFlag() == 0 {
return errors.New("port is required")
}