Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bartmeuris/progressio
/ functions
Functions
38 in github.com/bartmeuris/progressio
⨍
Functions
38
◇
Types & classes
10
↓ 8 callers
Method
String
String returns a string representation of the progress. It takes into account if the size was known, and only tries to display relevant data.
progress.go:101
↓ 5 callers
Function
FormatSize
FormatSize formats a number of bytes using the given unit standard system. If the 'short' flag is set to true, it uses the shortened names.
byteformatter.go:137
↓ 5 callers
Function
addCountString
(ostr string, val int64, str string)
durationformatter.go:44
↓ 4 callers
Function
getReader
()
examples_test.go:50
↓ 4 callers
Function
getWriter
()
examples_test.go:47
↓ 4 callers
Function
printProgress
(msg string, ch <-chan Progress)
examples_test.go:57
↓ 4 callers
Method
updateProgress
(written int64)
progress.go:164
↓ 3 callers
Function
NewProgressReader
NewProgressReader creates a new ProgressReader object based on the io.Reader and the size you specified. Specify a size <= 0 if you don't know the siz
progressreader.go:37
↓ 3 callers
Function
mkIoProgress
(size int64)
progress.go:150
↓ 2 callers
Function
FormatDuration
FormatDuration returns the string representation of the specified time.Duration, in the (if applicable) amount of weeks, days, hours, minutes and seco
durationformatter.go:81
↓ 2 callers
Function
NewProgressWriter
NewProgressWriter creates a new ProgressWriter object based on the io.Writer and the size you specified. Specify a size <= 0 if you don't know the siz
progresswriter.go:22
↓ 2 callers
Method
Seconds
Seconds returns the amount of seconds of the last partial minute represented by the SecondFormatter instance Minumum value: 0, Maximum value: 59
durationformatter.go:40
↓ 2 callers
Method
String
String returns the string representation of the SecondFormatter instance, specifying (if applicable): the amount of weeks, days, hours, minutes and se
durationformatter.go:63
↓ 2 callers
Function
getUnit
(ss SizeSystem, size int64)
byteformatter.go:116
↓ 2 callers
Method
stopProgress
()
progress.go:245
↓ 1 callers
Method
Close
()
progresswriter.go:8
↓ 1 callers
Method
Days
Days returns the amount of days of a partial week represented by the SecondFormatter instance Minimum value: 0, Maximum Value: 6
durationformatter.go:19
↓ 1 callers
Method
Hours
Hours returns the amount of hours of the last partial day represented by the SecondFormatter instance Minumum value: 0, Maximum value: 23
durationformatter.go:26
↓ 1 callers
Method
Minutes
Minutes returns the amount of minutes of the last partial hour represented by the SecondFormatter instance Minumum value: 0, Maximum value: 59
durationformatter.go:33
↓ 1 callers
Method
Weeks
Weeks returns the amount of whole weeks represented by the SecondFormatter instance Minimum value: 0
durationformatter.go:12
↓ 1 callers
Method
cleanup
()
progress.go:237
↓ 1 callers
Function
getNopWriteCloser
(w io.Writer)
progresswriter.go:9
Method
Close
Close wraps the io.WriterCloser Close function to clean up everything. ProgressWriter objects should always be closed to make sure everything is clean
progresswriter.go:43
Method
Close
Close wraps the io.ReaderCloser Close function to clean up everything. ProgressReader objects should always be closed to make sure everything is clean
progressreader.go:58
Function
ExampleReader
ExampleReader is an example of using the progressio package with an io.Reader without knowing the amount of bytes to be processed.
examples_test.go:97
Function
ExampleReaderSize
ExampleReaderSize is an example of using the progressio package with an io.Reader while knowing the expected amount of bytes to be processed.
examples_test.go:109
Function
ExampleWriter
ExampleWriter is an example of using the progressio package with an io.Writer without knowing the amount of bytes to be processed.
examples_test.go:73
Function
ExampleWriterSize
ExampleWriterSize is an example of using the progressio package with an io.Writer while knowing the expected amount of bytes to be processed.
examples_test.go:85
Function
FormatSeconds
FormatSeconds returns a string representing the (if applicable) amount of weeks, days, hours, minutes and seconds the amount of seconds it is passed a
durationformatter.go:88
Function
NewProgressFileReader
NewProgressFileReader creates a new ProgressReader based on a file. It teturns a ProgressReader object and a channel on success, or an error on failur
progressreader.go:18
Method
Read
(b []byte)
examples_test.go:35
Method
Read
Read wraps the io.Reader Read function to also update the progress.
progressreader.go:50
Function
TestIOProgress
(t *testing.T)
progress_test.go:85
Function
TestPrintNoSize
(t *testing.T)
progress_test.go:8
Function
TestPrintSize
(t *testing.T)
progress_test.go:29
Function
Test_getUnit
(t *testing.T)
byteformatter_test.go:5
Method
Write
Write wraps the io.Writer Write function to also update the progress.
progresswriter.go:35
Method
Write
(b []byte)
examples_test.go:18