From b980ce62925f52222cfa7c2a840a5e73dd167a03 Mon Sep 17 00:00:00 2001 From: HomeDash Bot Date: Sat, 12 Sep 2026 12:42:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(build):=20=E6=B5=8B=E8=AF=95=E6=96=87?= =?UTF-8?q?=E4=BB=B6=20import=20=E6=94=B9=E4=B8=BA=E5=9D=97=E5=BD=A2?= =?UTF-8?q?=E5=BC=8F=EF=BC=88os/filepath/testing=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main_test.go 原为单行 import "testing",补 import 的替换锚点没命中, 导致 os/filepath 未导入、history-server 编译失败(承接上一提交的坏状态)。 本次改为块形式导入,go vet 与 go test 均通过。 --- history-server/main.go | 1 - history-server/main_test.go | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/history-server/main.go b/history-server/main.go index 13d141f..ecf57a8 100644 --- a/history-server/main.go +++ b/history-server/main.go @@ -424,7 +424,6 @@ func rebuildDashySections() { } // 收集所有导航项(排除历史访问 section 本身),带 host 访问量 - hv := hostVisits() navVisits := loadNavVisits() // 导航项点击计数:常用服务的唯一依据 type cand struct { diff --git a/history-server/main_test.go b/history-server/main_test.go index 5e3588d..60b2a21 100644 --- a/history-server/main_test.go +++ b/history-server/main_test.go @@ -1,6 +1,10 @@ package main -import "testing" +import ( + "os" + "path/filepath" + "testing" +) func TestFriendlyHistoryTitle(t *testing.T) { cases := []struct {