diff --git a/cmd/open_im_api/Makefile b/cmd/open_im_api/Makefile index 5ea7e5742..d8fe26099 100644 --- a/cmd/open_im_api/Makefile +++ b/cmd/open_im_api/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_api BIN_DIR=../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build run: @go run ./ diff --git a/cmd/open_im_msg_gateway/Makefile b/cmd/open_im_msg_gateway/Makefile index 1b6e67e9c..566d8d9c2 100644 --- a/cmd/open_im_msg_gateway/Makefile +++ b/cmd/open_im_msg_gateway/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_msg_gateway BIN_DIR=../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" run: @go run ./ diff --git a/cmd/open_im_msg_transfer/Makefile b/cmd/open_im_msg_transfer/Makefile index 1813594d5..fb4946585 100644 --- a/cmd/open_im_msg_transfer/Makefile +++ b/cmd/open_im_msg_transfer/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_msg_transfer BIN_DIR=../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" run: @go run ./ diff --git a/cmd/open_im_push/Makefile b/cmd/open_im_push/Makefile index 73f1fdd35..df7b9e88a 100644 --- a/cmd/open_im_push/Makefile +++ b/cmd/open_im_push/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_push BIN_DIR=../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" run: @go run ./ diff --git a/cmd/rpc/open_im_auth/Makefile b/cmd/rpc/open_im_auth/Makefile index 12c10351d..845503757 100644 --- a/cmd/rpc/open_im_auth/Makefile +++ b/cmd/rpc/open_im_auth/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_auth BIN_DIR=../../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build run: @go run ./ diff --git a/cmd/rpc/open_im_friend/Makefile b/cmd/rpc/open_im_friend/Makefile index c1291dc82..8720ed80f 100644 --- a/cmd/rpc/open_im_friend/Makefile +++ b/cmd/rpc/open_im_friend/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_friend BIN_DIR=../../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build run: @go run ./ diff --git a/cmd/rpc/open_im_group/Makefile b/cmd/rpc/open_im_group/Makefile index 2ada2e2a6..6cd93dfd4 100644 --- a/cmd/rpc/open_im_group/Makefile +++ b/cmd/rpc/open_im_group/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_group BIN_DIR=../../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build run: @go run ./ diff --git a/cmd/rpc/open_im_msg/Makefile b/cmd/rpc/open_im_msg/Makefile index 2a2d08918..7214d3fe1 100644 --- a/cmd/rpc/open_im_msg/Makefile +++ b/cmd/rpc/open_im_msg/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_msg BIN_DIR=../../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" run: @go run ./ diff --git a/cmd/rpc/open_im_user/Makefile b/cmd/rpc/open_im_user/Makefile index d3f837791..4e124cc3a 100644 --- a/cmd/rpc/open_im_user/Makefile +++ b/cmd/rpc/open_im_user/Makefile @@ -2,13 +2,11 @@ BINARY_NAME=open_im_user BIN_DIR=../../../bin/ -LAN_FILE=.go -GO_FILE:=${BINARY_NAME}${LAN_FILE} all: gotool build build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build run: @go run ./ diff --git a/internal/api/chat/newest_seq.go b/internal/api/chat/newest_seq.go index 03d0cee32..06dad284e 100644 --- a/internal/api/chat/newest_seq.go +++ b/internal/api/chat/newest_seq.go @@ -1,11 +1,11 @@ package apiChat import ( - pbMsg "Open_IM/pkg/proto/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/common" + pbMsg "Open_IM/pkg/proto/chat" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "net/http" diff --git a/internal/api/chat/pull_msg.go b/internal/api/chat/pull_msg.go index 0e1c85df3..b8224064d 100644 --- a/internal/api/chat/pull_msg.go +++ b/internal/api/chat/pull_msg.go @@ -1,11 +1,11 @@ package apiChat import ( - "Open_IM/pkg/proto/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/common" + "Open_IM/pkg/proto/chat" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "net/http" diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 46264b867..e2975e759 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -1,10 +1,10 @@ package apiChat import ( - pbChat "Open_IM/pkg/proto/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" - "Open_IM/pkg/common" + pbChat "Open_IM/pkg/proto/chat" + "Open_IM/pkg/utils" "context" "Open_IM/pkg/grpc-etcdv3/getcdv3" diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 99ad3e73a..8430c7470 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -7,12 +7,12 @@ package manage import ( - pbChat "Open_IM/pkg/proto/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/common" + pbChat "Open_IM/pkg/proto/chat" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "github.com/go-playground/validator/v10" diff --git a/script/path_info.cfg b/script/path_info.cfg index ed250d29d..30e5b4491 100644 --- a/script/path_info.cfg +++ b/script/path_info.cfg @@ -1,26 +1,26 @@ #Don't put the space between "=" msg_gateway_name="open_im_msg_gateway" msg_gateway_binary_root="../bin/" -msg_gateway_source_root="../src/msg_gateway/" +msg_gateway_source_root="../cmd/open_im_msg_gateway/" msg_name="open_im_msg" msg_binary_root="../bin/" -msg_source_root="../src/rpc/chat/" +msg_source_root="../cmd/rpc/open_im_msg/" push_name="open_im_push" push_binary_root="../bin/" -push_source_root="../src/push/" +push_source_root="../cmd/open_im_push/" msg_transfer_name="open_im_msg_transfer" msg_transfer_binary_root="../bin/" -msg_transfer_source_root="../src/msg_transfer/" +msg_transfer_source_root="../cmd/open_im_msg_transfer/" sdk_server_name="open_im_sdk_server" sdk_server_binary_root="../bin/" -sdk_server_source_root="../src/Open-IM-SDK-Core/" +sdk_server_source_root="../cmd/Open-IM-SDK-Core/" #Global configuration file default dir @@ -29,12 +29,12 @@ config_path="../config/config.yaml" #servicefile dir path service_source_root=( #api service file - ../src/api/ + ../cmd/open_im_api/ #rpc service file - ../src/rpc/user/ - ../src/rpc/friend/ - ../src/rpc/group/ - ../src/rpc/auth/ + ../cmd/rpc/open_im_user/ + ../cmd/rpc/open_im_friend/ + ../cmd/rpc/open_im_group/ + ../cmd/rpc/open_im_auth/ ${msg_gateway_source_root} ${msg_transfer_source_root} ${msg_source_root}