service: pull out record to a var

This commit is contained in:
c9s 2022-06-24 15:27:51 +08:00
parent 3ad1f0e351
commit 1587630b7b
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -171,7 +171,8 @@ func lastRecordTime(sel SyncTask, recordSlice reflect.Value, defaultTime time.Ti
since := defaultTime
length := recordSlice.Len()
if length > 0 {
since = sel.Time(recordSlice.Index(length - 1).Interface())
last := recordSlice.Index(length - 1)
since = sel.Time(last)
}
return since