diff --git a/base/web/cache.go b/base/web/cache.go index 8e17d869..cbd8841b 100644 --- a/base/web/cache.go +++ b/base/web/cache.go @@ -92,7 +92,6 @@ func _cache_download(m *ice.Message, r *http.Response) (file, size string) { f.Write(buf[0:n]) s := size * 100 / total - m.Debug("what %v", kit.FileLine(m.OptionCB(SPIDE), 3)) switch cb := m.OptionCB(SPIDE).(type) { case func(int, int): cb(size, total) @@ -103,6 +102,9 @@ func _cache_download(m *ice.Message, r *http.Response) (file, size string) { }) default: if s != step && s%10 == 0 { + m.Debug("what %v", m.OptionCB(SPIDE)) + m.Debug("what %v", m.OptionCB(SPIDE)) + m.Debug("what %v", kit.FileLine(m.OptionCB(SPIDE), 3)) m.Log_IMPORT(kit.MDB_FILE, p, kit.MDB_STEP, s, kit.MDB_SIZE, kit.FmtSize(int64(size)), kit.MDB_TOTAL, kit.FmtSize(int64(total))) } diff --git a/misc.go b/misc.go index d105f22b..b5b977aa 100644 --- a/misc.go +++ b/misc.go @@ -103,7 +103,7 @@ func (m *Message) FieldsIsDetail() bool { } func (m *Message) OptionCB(key string, cb ...interface{}) interface{} { if len(cb) > 0 { - return m.Optionv(kit.Keycb(key), cb) + return m.Optionv(kit.Keycb(key), cb...) } return m.Optionv(kit.Keycb(key)) }