package
Version:
v1.13.2
Opens a new window with list of versions in this module.
Published: Aug 7, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Progress struct {
Writer io.Writer
}
Progress 用來追蹤正在執行之任何 I/O 操作的進度。
NewProgress 針對指定的總大小回傳一個新的進度追蹤器。
SetTotal 設定封存檔的總大小(位元組)。此函式可安全地並行呼叫,
可用來在總大小變動時進行更新,例如在資料透過進度寫入器寫入的同時,
也在計算總大小的情況。
Write 統計已寫入至 writer 的位元組總數。
Written 回傳已寫入的位元組總數。
當進度追蹤的是正在寫入的資料時,應使用此函式。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.