refactor: 采用 Go 1.22+ 语法简化循环和切片初始化

- 使用  替代
- 简化  为
- 统一代码风格,移除冗余的容量参数

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-04-09 10:34:25 +08:00
parent e8618f4888
commit 9825a85359
3 changed files with 4 additions and 4 deletions

View File

@@ -101,7 +101,7 @@ func (r *reader) GetCardInfo() *CardInfo {
}
s := make([]string, dataLength)
for i := 0; i < int(dataLength); i++ {
for i := range s {
s[i] = fmt.Sprintf("%02X", cardData[i])
}