dennis-tra/pcp

View on GitHub
internal/format/format.go

Summary

Maintainability
A
1 hr
Test Coverage

Function TransferStatus has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func TransferStatus(fn string, iteration int, twidth int, p float64, eta time.Duration, bytesPerS int64) string {
Severity: Minor
Found in internal/format/format.go - About 45 mins to fix

    Function Bytes has 5 return statements (exceeds 4 allowed).
    Open

    func Bytes(bytes int64) string {
        if bytes >= 1e12 {
            return fmt.Sprintf("%dTB", bytes/1e12)
        } else if bytes >= 1e9 {
            return fmt.Sprintf("%dGB", bytes/1e9)
    Severity: Major
    Found in internal/format/format.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status