refactor: 采用 Go 1.22+ 语法简化循环和切片初始化
- 使用 替代 - 简化 为 - 统一代码风格,移除冗余的容量参数 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user