From 4d307887384cbf88c1c12ee88bc33dfe2629dc11 Mon Sep 17 00:00:00 2001 From: Larvan2 <78135608+Larvan2@users.noreply.github.com> Date: Sat, 25 Mar 2023 22:56:24 +0800 Subject: [PATCH] chore: clean up code --- component/http/http.go | 5 +++-- hub/route/upgrade.go | 2 +- hub/updater/updater.go | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/component/http/http.go b/component/http/http.go index 54a3daa9..eb8478cd 100644 --- a/component/http/http.go +++ b/component/http/http.go @@ -2,14 +2,15 @@ package http import ( "context" - "github.com/Dreamacro/clash/component/tls" - "github.com/Dreamacro/clash/listener/inner" "io" "net" "net/http" URL "net/url" "strings" "time" + + "github.com/Dreamacro/clash/component/tls" + "github.com/Dreamacro/clash/listener/inner" ) const ( diff --git a/hub/route/upgrade.go b/hub/route/upgrade.go index 0d772c85..a4a8e683 100644 --- a/hub/route/upgrade.go +++ b/hub/route/upgrade.go @@ -10,9 +10,9 @@ import ( "github.com/Dreamacro/clash/hub/updater" "github.com/Dreamacro/clash/log" - "github.com/go-chi/render" "github.com/go-chi/chi/v5" + "github.com/go-chi/render" ) func upgradeRouter() http.Handler { diff --git a/hub/updater/updater.go b/hub/updater/updater.go index 8b9b7409..272b5017 100644 --- a/hub/updater/updater.go +++ b/hub/updater/updater.go @@ -42,8 +42,8 @@ var ( updateExeName string // 更新后的可执行文件 unpackedFile string - baseURL = "https://github.com/MetaCubeX/Clash.Meta/releases/download/Prerelease-Alpha/clash.meta" - versionURL = "https://github.com/MetaCubeX/Clash.Meta/releases/download/Prerelease-Alpha/version.txt" + baseURL string = "https://ghproxy.com/https://github.com/MetaCubeX/Clash.Meta/releases/download/Prerelease-Alpha/clash.meta" + versionURL string = "https://github.com/MetaCubeX/Clash.Meta/releases/download/Prerelease-Alpha/version.txt" packageURL string latestVersion string )