Skip to content

Commit 259d26f

Browse files
author
Nexus
committed
fix: resolve build errors
- Remove duplicate io import in utils_test.go - Replace ioutil.NopCloser with io.NopCloser - Fix string(uint64) conversion in concurrenceMap_test.go
1 parent 30ae3ef commit 259d26f

3 files changed

Lines changed: 36 additions & 4 deletions

File tree

core/concurrenceMap_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestItemContext_Current(t *testing.T) {
7272
func BenchmarkItemContext_Set_1(b *testing.B) {
7373
var num uint64 = 1
7474
for i := 0; i < b.N; i++ {
75-
ic.Set(string(num), num)
75+
ic.Set(fmt.Sprintf("%d", num), num)
7676
}
7777
}
7878

@@ -81,7 +81,7 @@ func BenchmarkItemContext_Set_Parallel(b *testing.B) {
8181
b.RunParallel(func(pb *testing.PB) {
8282
var num uint64 = 1
8383
for pb.Next() {
84-
ic.Set(string(num), num)
84+
ic.Set(fmt.Sprintf("%d", num), num)
8585
}
8686
})
8787
}

memory/2026-03-01.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# 2026-03-01 工作日志
2+
3+
## dotweb 项目迭代
4+
5+
### 今日完成
6+
7+
**PR 列表:**
8+
- #257: 修复路由尾部斜杠问题 (issue #245)
9+
- #258: 升级 Go 1.21 和依赖
10+
- #259: 添加 GitHub Actions CI
11+
- #260: 添加示例代码 (JWT, 文件上传, CORS)
12+
- #262: 修复 CORS 路由组问题 (issue #250)
13+
- #263: 优化 README
14+
- #264: 添加 .gitignore
15+
- #265: 添加 CHANGELOG
16+
- #266: golangci-lint 修复 v1
17+
- #267: golangci-lint 修复 v2
18+
19+
**代码修复:**
20+
- GlobalState 测试变量
21+
- strconv.FormatUint 转换
22+
- time.Since 替换
23+
- io/ioutil 替换
24+
- 简化 else 分支
25+
- 移除空 else 块
26+
- Context key 类型自定义
27+
28+
### 仓库
29+
- devfeel/dotweb (aicode 分支)
30+
- devfeel/freeworld (新建仓库)
31+
32+
### 每日任务
33+
- 每天 9:00 自动执行 (已设置 cron)

utils_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"fmt"
66
"io"
7-
"io"
87
"net/http"
98
"net/url"
109
"strings"
@@ -112,7 +111,7 @@ func (ho httpWriter) WriteHeader(code int) {
112111

113112
func format(b string) io.ReadCloser {
114113
s := strings.NewReader(b)
115-
r := ioutil.NopCloser(s)
114+
r := io.NopCloser(s)
116115
r.Close()
117116
return r
118117
}

0 commit comments

Comments
 (0)