MCPcopy Index your code
hub / github.com/codechenx/FastTableViewer / GetPercentage

Method GetPercentage

init.go:60–69  ·  view source on GitHub ↗

GetPercentage returns the loading percentage (0-100)

()

Source from the content-addressed store, hash-verified

58
59// GetPercentage returns the loading percentage (0-100)
60func (lp *LoadProgress) GetPercentage() float64 {
61 if lp.TotalBytes <= 0 {
62 return 0
63 }
64 percent := float64(lp.LoadedBytes) * 100.0 / float64(lp.TotalBytes)
65 if percent > 100 {
66 percent = 100
67 }
68 return percent
69}
70
71// SearchResult represents a cell that matches search query
72type SearchResult struct {

Callers 1

startAsyncUpdateHandlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected