style: formatting style Code

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw-openim)
2023-08-10 15:55:12 +08:00
parent 3640499340
commit 5dd59a51d9
20 changed files with 925 additions and 357 deletions
+64
View File
@@ -68,6 +68,70 @@ export OPENIM_OUTPUT_HOSTBIN
export OPENIM_NONSERVER_GROUP_VERSIONS
# The server platform we are building on.
readonly OPENIM_SUPPORTED_SERVER_PLATFORMS=(
linux/amd64
linux/arm64
)
# If we update this we should also update the set of platforms whose standard
# library is precompiled for in build/image/cross/Dockerfile
readonly OPENIM_SUPPORTED_CLIENT_PLATFORMS=(
linux/amd64
linux/arm64
)
# The set of server targets that we are only building for Linux
# If you update this list, please also update build/BUILD.
openim::golang::server_targets() {
local targets=(
openim-api
openim-cmdutils
openim-crontask
openim-msggateway
openim-msgtransfer
openim-push
openim-rpc-auth
openim-rpc-conversation
openim-rpc-friend
openim-rpc-group
openim-rpc-msg
openim-rpc-third
openim-rpc-user
)
echo "${targets[@]}"
}
openim::golang::server_tools_targets() {
local targets=(
yamlfmt
changelog
infra
ncpu
)
echo "${targets[@]}"
}
IFS=" " read -ra OPENIM_SERVER_TARGETS <<< "$(openim::golang::server_targets)"
readonly OPENIM_SERVER_TARGETS
readonly OPENIM_SERVER_BINARIES=("${OPENIM_SERVER_TARGETS[@]##*/}")
# The set of server targets we build docker images for
openim::golang::server_image_targets() {
# NOTE: this contains cmd targets for openim::build::get_docker_wrapped_binaries
local targets=(
cmd/openim-apiserver
cmd/openim-authz-server
cmd/openim-pump
cmd/openim-watcher
)
echo "${targets[@]}"
}
IFS=" " read -ra OPENIM_SERVER_IMAGE_TARGETS <<< "$(openim::golang::server_image_targets)"
readonly OPENIM_SERVER_IMAGE_TARGETS
readonly OPENIM_SERVER_IMAGE_BINARIES=("${OPENIM_SERVER_IMAGE_TARGETS[@]##*/}")
# This emulates "readlink -f" which is not available on MacOS X.
# Test:
# T=/tmp/$$.$RANDOM