clean and change type
This commit is contained in:
@@ -41,12 +41,13 @@ func listCartFiles(dir string) ([]CartFileInfo, error) {
|
||||
continue
|
||||
}
|
||||
name := e.Name()
|
||||
var id int64
|
||||
var idStr string
|
||||
var id uint64
|
||||
var parseErr error
|
||||
parts := strings.Split(name, ".")
|
||||
if len(parts) > 1 && parts[1] == "events" {
|
||||
idStr := parts[0]
|
||||
id, parseErr = strconv.ParseInt(idStr, 10, 64)
|
||||
idStr = parts[0]
|
||||
id, parseErr = strconv.ParseUint(idStr, 10, 64)
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
@@ -59,7 +60,7 @@ func listCartFiles(dir string) ([]CartFileInfo, error) {
|
||||
continue
|
||||
}
|
||||
out = append(out, CartFileInfo{
|
||||
ID: uint64(id),
|
||||
ID: idStr,
|
||||
CartId: cart.CartId(id),
|
||||
Size: info.Size(),
|
||||
Modified: info.ModTime(),
|
||||
|
||||
Reference in New Issue
Block a user