Skip to content

Commit

Permalink
fix: export IdFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill committed Feb 1, 2024
1 parent 5625502 commit 4099ecf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/storer/internal/upload/uploadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ type uploadItem struct {
Uploaded int64
Synced int64

// idFunc overrides the ID method.
// IdFunc overrides the ID method.
// This used to get the ID from the item where the address and batchID were not marshalled.
idFunc func() string
IdFunc func() string
}

// ID implements the storage.Item interface.
func (i uploadItem) ID() string {
if i.idFunc != nil {
return i.idFunc()
if i.IdFunc != nil {
return i.IdFunc()
}
return storageutil.JoinFields(i.Address.ByteString(), string(i.BatchID))
}
Expand Down Expand Up @@ -834,7 +834,7 @@ func IterateAll(st storage.Store, iterateFn func(item storage.Item) (bool, error
},
func(r storage.Result) (bool, error) {
ui := r.Entry.(*uploadItem)
ui.idFunc = func() string {
ui.IdFunc = func() string {
return r.ID
}
return iterateFn(ui)
Expand Down

0 comments on commit 4099ecf

Please sign in to comment.