feature/backoffice #6
@@ -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(),
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
type CartFileInfo struct {
|
||||
ID uint64 `json:"id"`
|
||||
ID string `json:"id"`
|
||||
CartId cart.CartId `json:"cartId"`
|
||||
Size int64 `json:"size"`
|
||||
Modified time.Time `json:"modified"`
|
||||
|
||||
BIN
data/1.prot
BIN
data/1.prot
Binary file not shown.
BIN
data/4.prot
BIN
data/4.prot
Binary file not shown.
BIN
data/5.prot
BIN
data/5.prot
Binary file not shown.
BIN
data/state.gob
BIN
data/state.gob
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user