mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 02:26:00 +08:00
feat(main): 🚀 Database Name Correction and S3 Module Int32 Overflow Fix with Go Routine Integration for Automated Checks and Script Optimization (#1799)
* feat: replace mongo database openIM_v3 to openim_v3 * openim-building-an-efficient-version-control-and-testing-workflow * feat: complete openim source deployment rpc start timeout * feat: optimize config Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> * feat: add scripts format * feat: use scripts format code * fix cos and minio etc to typecheck * feat: scripts make verify check ci * fix: make file verify spelling * fix: make file verify spelling * Concurrent Type Checking and Cross-Platform Development in Go * feat: add copyright make lint and format * feat: add config examples file Signed-off-by: Xinwei Xiong <3293172751@qq.com> * feat: add config examples file Signed-off-by: Xinwei Xiong <3293172751@qq.com> --------- Signed-off-by: Xinwei Xiong (cubxxw) <3293172751nss@gmail.com> Signed-off-by: Xinwei Xiong <3293172751@qq.com>
This commit is contained in:
+27
-27
@@ -14,43 +14,43 @@
|
||||
# limitations under the License.
|
||||
|
||||
DEFAULT_DIRS=(
|
||||
"pkg"
|
||||
"internal/pkg"
|
||||
"pkg"
|
||||
"internal/pkg"
|
||||
)
|
||||
BASE_URL="github.com/openimsdk/open-im-server"
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo
|
||||
echo "This script iterates over directories and generates doc.go if necessary."
|
||||
echo "By default, it processes 'pkg' and 'internal/pkg' directories."
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -d DIRS, --dirs DIRS Specify the directories to be processed, separated by commas. E.g., 'pkg,internal/pkg'."
|
||||
echo " -u URL, --url URL Set the base URL for the import path. Default is '$BASE_URL'."
|
||||
echo " -h, --help Show this help message."
|
||||
echo
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo
|
||||
echo "This script iterates over directories and generates doc.go if necessary."
|
||||
echo "By default, it processes 'pkg' and 'internal/pkg' directories."
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -d DIRS, --dirs DIRS Specify the directories to be processed, separated by commas. E.g., 'pkg,internal/pkg'."
|
||||
echo " -u URL, --url URL Set the base URL for the import path. Default is '$BASE_URL'."
|
||||
echo " -h, --help Show this help message."
|
||||
echo
|
||||
}
|
||||
|
||||
process_dir() {
|
||||
local dir=$1
|
||||
local base_url=$2
|
||||
|
||||
for d in $(find $dir -type d); do
|
||||
if [ ! -f $d/doc.go ]; then
|
||||
if ls $d/*.go > /dev/null 2>&1; then
|
||||
echo $d/doc.go
|
||||
echo "package $(basename $d) // import \"$base_url/$d\"" > $d/doc.go
|
||||
fi
|
||||
fi
|
||||
done
|
||||
local dir=$1
|
||||
local base_url=$2
|
||||
|
||||
for d in $(find $dir -type d); do
|
||||
if [ ! -f $d/doc.go ]; then
|
||||
if ls $d/*.go > /dev/null 2>&1; then
|
||||
echo $d/doc.go
|
||||
echo "package $(basename $d) // import \"$base_url/$d\"" > $d/doc.go
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-d|--dirs)
|
||||
key="$1"
|
||||
|
||||
case $key in
|
||||
-d|--dirs)
|
||||
IFS=',' read -ra DIRS <<< "$2"
|
||||
shift # shift past argument
|
||||
shift # shift past value
|
||||
|
||||
Reference in New Issue
Block a user