diff options
author | Michael Muré <batolettre@gmail.com> | 2023-01-10 21:36:03 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2023-01-11 14:31:22 +0100 |
commit | 7df34aa7a40be0d7b759ea3ef42cedf9f25f32b2 (patch) | |
tree | a3d1cc77f56814d4ec8838f18cb6768035c1b290 /entity/streamed.go | |
parent | 9c50a359704f4edd2f33df6d256e032feae3a576 (diff) | |
download | git-bug-7df34aa7a40be0d7b759ea3ef42cedf9f25f32b2.tar.gz |
commands: add a nice terminal progress bar when building the cache
One issue remaining is that writing the cache takes significant time, but I don't know how to reflect that nicely to the user.
Diffstat (limited to 'entity/streamed.go')
-rw-r--r-- | entity/streamed.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/entity/streamed.go b/entity/streamed.go index 789224a3..33124ef0 100644 --- a/entity/streamed.go +++ b/entity/streamed.go @@ -1,6 +1,11 @@ package entity type StreamedEntity[EntityT Interface] struct { - Entity EntityT Err error + Entity EntityT + + // CurrentEntity is the index of the current entity being streamed, to express progress. + CurrentEntity int64 + // TotalEntities is the total count of expected entities, if known. + TotalEntities int64 } |