Skip to content

Commit 43fbf69

Browse files
author
OpenShift Bot
authored
Merge pull request #11813 from stevekuznetsov/skuznets/util-cleanup
Merged by openshift-bot
2 parents c04cab8 + cf30933 commit 43fbf69

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

hack/lib/util/misc.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,19 @@ function os::util::curl_etcd() {
209209

210210
curl --fail --silent --cacert "${ca_bundle}" \
211211
--cert "${etcd_client_cert}" --key "${etcd_client_key}" "${full_url}"
212-
}
212+
}
213+
214+
# os::util::host_platform determines what the host OS and architecture
215+
# are, as Golang sees it. The go tool chain does some slightly different
216+
# things when the target platform matches the host platform.
217+
#
218+
# Globals:
219+
# None
220+
# Arguments:
221+
# None
222+
# Returns:
223+
# None
224+
function os::util::host_platform() {
225+
echo "$(go env GOHOSTOS)/$(go env GOHOSTARCH)"
226+
}
227+
readonly -f os::util::host_platform

hack/util.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ function kill_all_processes() {
3838
}
3939
readonly -f kill_all_processes
4040

41-
# time_now return the time since the epoch in millis
42-
function time_now() {
43-
echo $(date +%s000)
44-
}
45-
readonly -f time_now
46-
4741
# dump_container_logs writes container logs to $LOG_DIR
4842
function dump_container_logs() {
4943
if ! docker version >/dev/null 2>&1; then
@@ -201,11 +195,4 @@ function find_files() {
201195
\) -prune \
202196
\) -name '*.go' | sort -u
203197
}
204-
readonly -f find_files
205-
206-
# Asks golang what it thinks the host platform is. The go tool chain does some
207-
# slightly different things when the target platform matches the host platform.
208-
function os::util::host_platform() {
209-
echo "$(go env GOHOSTOS)/$(go env GOHOSTARCH)"
210-
}
211-
readonly -f os::util::host_platform
198+
readonly -f find_files

0 commit comments

Comments
 (0)