diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c123566f1..ef712a27c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -56,7 +56,8 @@ jobs: - name: Generate all necessary files, such as error code files run: | - make generate + make gen.docgo.doc + make gen echo "Generate all necessary files successfully" continue-on-error: true diff --git a/pkg/apistruct/doc.go b/pkg/apistruct/doc.go index 2f1404584..6be41c9e5 100644 --- a/pkg/apistruct/doc.go +++ b/pkg/apistruct/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/authverify/doc.go b/pkg/authverify/doc.go index f9173a708..14d63a410 100644 --- a/pkg/authverify/doc.go +++ b/pkg/authverify/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/callbackstruct/doc.go b/pkg/callbackstruct/doc.go index c3445c60e..965186c6c 100644 --- a/pkg/callbackstruct/doc.go +++ b/pkg/callbackstruct/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/cachekey/doc.go b/pkg/common/cachekey/doc.go new file mode 100644 index 000000000..4975537ec --- /dev/null +++ b/pkg/common/cachekey/doc.go @@ -0,0 +1,15 @@ +// Copyright © 2024 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cachekey // import "github.com/openimsdk/open-im-server/v3/pkg/common/cachekey" diff --git a/pkg/common/cmd/doc.go b/pkg/common/cmd/doc.go index 991a85eb9..96d80b64a 100644 --- a/pkg/common/cmd/doc.go +++ b/pkg/common/cmd/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/config/doc.go b/pkg/common/config/doc.go index 4b76cb9fa..189a5b583 100644 --- a/pkg/common/config/doc.go +++ b/pkg/common/config/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/convert/doc.go b/pkg/common/convert/doc.go index 29c1144c1..623b4a5c0 100644 --- a/pkg/common/convert/doc.go +++ b/pkg/common/convert/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/db/cache/doc.go b/pkg/common/db/cache/doc.go index 77651e3de..a5c237249 100644 --- a/pkg/common/db/cache/doc.go +++ b/pkg/common/db/cache/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/db/controller/doc.go b/pkg/common/db/controller/doc.go index 72316f128..97ec08799 100644 --- a/pkg/common/db/controller/doc.go +++ b/pkg/common/db/controller/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/db/mgo/doc.go b/pkg/common/db/mgo/doc.go new file mode 100644 index 000000000..f9d43e885 --- /dev/null +++ b/pkg/common/db/mgo/doc.go @@ -0,0 +1,15 @@ +// Copyright © 2024 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package mgo // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/mgo" diff --git a/pkg/common/db/s3/cont/doc.go b/pkg/common/db/s3/cont/doc.go index 45737bc7c..16138316f 100644 --- a/pkg/common/db/s3/cont/doc.go +++ b/pkg/common/db/s3/cont/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/db/s3/cos/doc.go b/pkg/common/db/s3/cos/doc.go index e18288858..fdf0ecab0 100644 --- a/pkg/common/db/s3/cos/doc.go +++ b/pkg/common/db/s3/cos/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cos // import "internal/pkg/pkg/common/db/s3/cos" +package cos // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/cos" diff --git a/pkg/common/db/s3/doc.go b/pkg/common/db/s3/doc.go index a43710676..4b7f4fc3e 100644 --- a/pkg/common/db/s3/doc.go +++ b/pkg/common/db/s3/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/db/s3/minio/doc.go b/pkg/common/db/s3/minio/doc.go index 72b319ef4..b7db5e05f 100644 --- a/pkg/common/db/s3/minio/doc.go +++ b/pkg/common/db/s3/minio/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package minio // import "internal/pkg/pkg/common/db/s3/minio" +package minio // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/minio" diff --git a/pkg/common/db/s3/oss/doc.go b/pkg/common/db/s3/oss/doc.go index c86be0886..ff8a13ff9 100644 --- a/pkg/common/db/s3/oss/doc.go +++ b/pkg/common/db/s3/oss/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package oss // import "internal/pkg/pkg/common/db/s3/oss" +package oss // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/oss" diff --git a/pkg/common/db/table/relation/doc.go b/pkg/common/db/table/relation/doc.go index a818055a4..c711dec70 100644 --- a/pkg/common/db/table/relation/doc.go +++ b/pkg/common/db/table/relation/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package relation // import "internal/pkg/pkg/common/db/table/relation" +package relation // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" diff --git a/pkg/common/db/table/unrelation/doc.go b/pkg/common/db/table/unrelation/doc.go index 7596206a0..b69ef5526 100644 --- a/pkg/common/db/table/unrelation/doc.go +++ b/pkg/common/db/table/unrelation/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/db/unrelation/doc.go b/pkg/common/db/unrelation/doc.go index 1a15e42c4..99b9c3407 100644 --- a/pkg/common/db/unrelation/doc.go +++ b/pkg/common/db/unrelation/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/discoveryregister/direct/doc.go b/pkg/common/discoveryregister/direct/doc.go index d9e3b60d4..b3cd0f804 100644 --- a/pkg/common/discoveryregister/direct/doc.go +++ b/pkg/common/discoveryregister/direct/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package direct // import "internal/pkg/pkg/common/discoveryregister/direct" +package direct // import "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/direct" diff --git a/pkg/common/discoveryregister/doc.go b/pkg/common/discoveryregister/doc.go index ec956a888..46bbe7001 100644 --- a/pkg/common/discoveryregister/doc.go +++ b/pkg/common/discoveryregister/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package discoveryregister // import "internal/pkg/pkg/common/discoveryregister" +package discoveryregister // import "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister" diff --git a/pkg/common/discoveryregister/kubernetes/doc.go b/pkg/common/discoveryregister/kubernetes/doc.go index d6c07d51a..8615caa6b 100644 --- a/pkg/common/discoveryregister/kubernetes/doc.go +++ b/pkg/common/discoveryregister/kubernetes/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package kubernetes // import "internal/pkg/pkg/common/discoveryregister/kubernetes" +package kubernetes // import "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/kubernetes" diff --git a/pkg/common/discoveryregister/zookeeper/doc.go b/pkg/common/discoveryregister/zookeeper/doc.go index 94eeecb51..1c24d77ac 100644 --- a/pkg/common/discoveryregister/zookeeper/doc.go +++ b/pkg/common/discoveryregister/zookeeper/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package zookeeper // import "internal/pkg/pkg/common/discoveryregister/zookeeper" +package zookeeper // import "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister/zookeeper" diff --git a/pkg/common/ginprometheus/doc.go b/pkg/common/ginprometheus/doc.go index f49a7ac73..7d81b7a8a 100644 --- a/pkg/common/ginprometheus/doc.go +++ b/pkg/common/ginprometheus/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package ginprometheus // import "internal/pkg/pkg/common/ginprometheus" +package ginprometheus // import "github.com/openimsdk/open-im-server/v3/pkg/common/ginprometheus" diff --git a/pkg/common/http/doc.go b/pkg/common/http/doc.go index e6fd3ec1e..8368203f6 100644 --- a/pkg/common/http/doc.go +++ b/pkg/common/http/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/kafka/doc.go b/pkg/common/kafka/doc.go index 0f0c69a76..880be4f6a 100644 --- a/pkg/common/kafka/doc.go +++ b/pkg/common/kafka/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/common/prommetrics/doc.go b/pkg/common/prommetrics/doc.go index 3e0d5f35e..c5108b4cb 100644 --- a/pkg/common/prommetrics/doc.go +++ b/pkg/common/prommetrics/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package prommetrics // import "internal/pkg/pkg/common/prommetrics" +package prommetrics // import "github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics" diff --git a/pkg/common/redispubsub/doc.go b/pkg/common/redispubsub/doc.go index 113c040ff..19b2e38f2 100644 --- a/pkg/common/redispubsub/doc.go +++ b/pkg/common/redispubsub/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package redispubsub // import "internal/pkg/pkg/common/redispubsub" +package redispubsub // import "github.com/openimsdk/open-im-server/v3/pkg/common/redispubsub" diff --git a/pkg/common/startrpc/doc.go b/pkg/common/startrpc/doc.go index 206e7900f..fce7309f4 100644 --- a/pkg/common/startrpc/doc.go +++ b/pkg/common/startrpc/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,5 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package startrpc start rpc server. -package startrpc +package startrpc // import "github.com/openimsdk/open-im-server/v3/pkg/common/startrpc" diff --git a/pkg/common/tls/doc.go b/pkg/common/tls/doc.go index 42896ee67..fcf8067b1 100644 --- a/pkg/common/tls/doc.go +++ b/pkg/common/tls/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package tls // import "internal/pkg/pkg/common/tls" +package tls // import "github.com/openimsdk/open-im-server/v3/pkg/common/tls" diff --git a/pkg/common/version/doc.go b/pkg/common/version/doc.go index 13171c00f..a41ce8d13 100644 --- a/pkg/common/version/doc.go +++ b/pkg/common/version/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package version // import "internal/pkg/pkg/common/version" +package version // import "github.com/openimsdk/open-im-server/v3/pkg/common/version" diff --git a/pkg/localcache/doc.go b/pkg/localcache/doc.go index 5e816dde8..24d44b090 100644 --- a/pkg/localcache/doc.go +++ b/pkg/localcache/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package localcache // import "internal/pkg/pkg/localcache" +package localcache // import "github.com/openimsdk/open-im-server/v3/pkg/localcache" diff --git a/pkg/localcache/link/doc.go b/pkg/localcache/link/doc.go index bfb18e71f..e01e7d23d 100644 --- a/pkg/localcache/link/doc.go +++ b/pkg/localcache/link/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package link // import "internal/pkg/pkg/localcache/link" +package link // import "github.com/openimsdk/open-im-server/v3/pkg/localcache/link" diff --git a/pkg/localcache/lru/doc.go b/pkg/localcache/lru/doc.go index 1632c07e7..50edcc11b 100644 --- a/pkg/localcache/lru/doc.go +++ b/pkg/localcache/lru/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package lru // import "internal/pkg/pkg/localcache/lru" +package lru // import "github.com/openimsdk/open-im-server/v3/pkg/localcache/lru" diff --git a/pkg/msgprocessor/doc.go b/pkg/msgprocessor/doc.go index d1e24ce30..e8c96befb 100644 --- a/pkg/msgprocessor/doc.go +++ b/pkg/msgprocessor/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rpccache/doc.go b/pkg/rpccache/doc.go index 094200d7e..4244bb239 100644 --- a/pkg/rpccache/doc.go +++ b/pkg/rpccache/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package rpccache // import "internal/pkg/pkg/rpccache" +package rpccache // import "github.com/openimsdk/open-im-server/v3/pkg/rpccache" diff --git a/pkg/rpcclient/doc.go b/pkg/rpcclient/doc.go index 0fdfacc60..66b0aee91 100644 --- a/pkg/rpcclient/doc.go +++ b/pkg/rpcclient/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rpcclient/grouphash/doc.go b/pkg/rpcclient/grouphash/doc.go index 43212534c..c780701d9 100644 --- a/pkg/rpcclient/grouphash/doc.go +++ b/pkg/rpcclient/grouphash/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package grouphash // import "internal/pkg/pkg/rpcclient/grouphash" +package grouphash // import "github.com/openimsdk/open-im-server/v3/pkg/rpcclient/grouphash" diff --git a/pkg/rpcclient/notification/doc.go b/pkg/rpcclient/notification/doc.go index 2d409bdc9..8ce57ca4e 100644 --- a/pkg/rpcclient/notification/doc.go +++ b/pkg/rpcclient/notification/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/statistics/doc.go b/pkg/statistics/doc.go index 8051c4c71..7b02631dc 100644 --- a/pkg/statistics/doc.go +++ b/pkg/statistics/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// Copyright © 2024 OpenIM. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/util/flag/doc.go b/pkg/util/flag/doc.go index 10d320aca..96939328d 100644 --- a/pkg/util/flag/doc.go +++ b/pkg/util/flag/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package flag // import "internal/pkg/pkg/util/flag" +package flag // import "github.com/openimsdk/open-im-server/v3/pkg/util/flag" diff --git a/pkg/util/genutil/doc.go b/pkg/util/genutil/doc.go index eb9ec99d5..aa9efeb56 100644 --- a/pkg/util/genutil/doc.go +++ b/pkg/util/genutil/doc.go @@ -12,4 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package genutil // import "internal/pkg/pkg/util/genutil" +package genutil // import "github.com/openimsdk/open-im-server/v3/pkg/util/genutil" diff --git a/scripts/gendoc.sh b/scripts/gendoc.sh index 397e77d8b..43b69c3ed 100755 --- a/scripts/gendoc.sh +++ b/scripts/gendoc.sh @@ -13,66 +13,72 @@ # See the License for the specific language governing permissions and # limitations under the License. -DEFAULT_DIRS=( - "pkg" - "internal/pkg" -) +#!/bin/bash + +DEFAULT_DIRS=("pkg") BASE_URL="github.com/openimsdk/open-im-server/v3" +REMOVE_DOC=false 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 "This script iterates over directories. By default, it generates doc.go files for 'pkg' and 'internal/pkg'." 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 " -d DIRS, --dirs DIRS Specify directories to process, 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 " -r, --remove Remove all doc.go files in the specified directories." + echo " -h, --help Show this help message." echo } process_dir() { - local dir=$1 - local base_url=$2 + local dir="$1" + local base_url="$2" + local remove_doc="$3" - 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 + find "$dir" -type d | while read -r d; do + if [ "$remove_doc" = true ]; then + if [ -f "$d/doc.go" ]; then + echo "Removing $d/doc.go" + rm -f "$d/doc.go" + fi + else + if [ ! -f "$d/doc.go" ] && ls "$d/"*.go &>/dev/null; then + echo "Creating $d/doc.go" + echo "package $(basename "$d") // import \"$base_url/$(echo "$d" | sed "s|^\./||")\"" >"$d/doc.go" fi fi done } while [[ $# -gt 0 ]]; do - key="$1" - - case $key in + case "$1" in -d|--dirs) - IFS=',' read -ra DIRS <<< "$2" - shift # shift past argument - shift # shift past value - ;; - -u|--url) - BASE_URL="$2" - shift # shift past argument - shift # shift past value - ;; - -h|--help) - usage - exit 0 - ;; - *) - usage - exit 1 - ;; - esac + IFS=',' read -ra DIRS <<< "$2" + shift 2 + ;; + -u|--url) + BASE_URL="$2" + shift 2 + ;; + -r|--remove) + REMOVE_DOC=true + shift + ;; + -h|--help) + usage + exit 0 + ;; + *) + usage + exit 1 + ;; + esac done -DIRS=${DIRS:-${DEFAULT_DIRS[@]}} +DIRS=(${DIRS:-"${DEFAULT_DIRS[@]}"}) for dir in "${DIRS[@]}"; do - process_dir $dir $BASE_URL + process_dir "$dir" "$BASE_URL" "$REMOVE_DOC" done