From d09937520089061d002fded006a35494bd7a41f4 Mon Sep 17 00:00:00 2001 From: Larvan2 <78135608+Larvan2@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:52:41 +0800 Subject: [PATCH] chore: rename func name --- hub/route/restart.go | 4 ++-- hub/route/upgrade.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hub/route/restart.go b/hub/route/restart.go index cae21844..a907021f 100644 --- a/hub/route/restart.go +++ b/hub/route/restart.go @@ -39,10 +39,10 @@ func restart(w http.ResponseWriter, r *http.Request) { // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. - go runRestart(execPath) + go restartExecutable(execPath) } -func runRestart(execPath string) { +func restartExecutable(execPath string) { var err error executor.Shutdown() if runtime.GOOS == "windows" { diff --git a/hub/route/upgrade.go b/hub/route/upgrade.go index a58f224c..5e75bc8b 100644 --- a/hub/route/upgrade.go +++ b/hub/route/upgrade.go @@ -41,5 +41,5 @@ func upgrade(w http.ResponseWriter, r *http.Request) { f.Flush() } - go runRestart(execPath) + go restartExecutable(execPath) }