Repository: etcd-io/etcd (language: go)

Issue:
Rename scripts' `modules_exp` to `modules_for_bom`
### What would you like to be added?

This is a follow-up on https://github.com/etcd-io/etcd/pull/18590#issuecomment-2359057943. Currently, the function `modules_exp` defined in `scripts/test_lib.sh` is serving the only purpose of providing a list of modules for verifying and fixing the bill of materials (BOM).

https://github.com/etcd-io/etcd/blob/e094139b05244c5eab0e62172f92ac5e90feb73b/scripts/test_lib.sh#L199-L203

We should rename it from `modules_exp` to `modules_for_bom` for clarity and update the two instances where it is referenced:

1. `scripts/test.sh`: https://github.com/etcd-io/etcd/blob/4f9cd336a64e0b709b2f2ef37cf3fff21a86ba39/scripts/test.sh#L508-L512
2. `scripts/updatebom.sh`: https://github.com/etcd-io/etcd/blob/4f9cd336a64e0b709b2f2ef37cf3fff21a86ba39/scripts/updatebom.sh#L15

### Why is this needed?

To improve the code and clarity of the helper functions from the build and test scripts.


Discussion / hints:

Fix patch:
diff --git a/scripts/updatebom.sh b/scripts/updatebom.sh
index dd482a325f9..2c6bf8720b0 100755
--- a/scripts/updatebom.sh
+++ b/scripts/updatebom.sh
@@ -12,7 +12,7 @@ function bom_fixlet {
 
   local modules
   # shellcheck disable=SC2207
-  modules=($(modules_exp))
+  modules=($(modules_for_bom))
 
   if GOFLAGS=-mod=mod run_go_tool "github.com/appscodelabs/license-bill-of-materials" \
       --override-file ./bill-of-materials.override.json \


Test patch:
diff --git a/scripts/test.sh b/scripts/test.sh
index cb35af673d5..3b15638cfb3 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -509,7 +509,7 @@ function bom_pass {
   log_callout "Checking bill of materials..."
   # https://github.com/golang/go/commit/7c388cc89c76bc7167287fb488afcaf5a4aa12bf
   # shellcheck disable=SC2207
-  modules=($(modules_exp))
+  modules=($(modules_for_bom))
 
   # Internally license-bill-of-materials tends to modify go.sum
   run cp go.sum go.sum.tmp || return 2
diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh
index 41e9a5e1531..ebd739156b1 100644
--- a/scripts/test_lib.sh
+++ b/scripts/test_lib.sh
@@ -196,7 +196,7 @@ function modules() {
   echo "${modules[@]}"
 }
 
-function modules_exp() {
+function modules_for_bom() {
   for m in $(modules); do
     echo -n "${m}/... "
   done