Refactor a bit

This commit is contained in:
Richard Patel
2018-10-28 13:43:45 +01:00
parent 7c4ed9d41e
commit ddfdce9d0f
6 changed files with 280 additions and 284 deletions

View File

@@ -13,6 +13,14 @@ var totalDone uint64
var totalRetries uint64
var totalAborted uint64
type File struct {
Name string `json:"name"`
Size int64 `json:"size"`
MTime time.Time `json:"mtime"`
Path string `json:"path"`
IsDir bool `json:"-"`
}
func Stats(c context.Context) {
var startedLast uint64 = 0
ticker := time.NewTicker(config.StatsInterval).C