fixed inefficient file report bug
This commit is contained in:
parent
3ea8c0ab4a
commit
fad2354e89
@ -5,9 +5,9 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/wagoodman/dive/image"
|
||||
"github.com/wagoodman/dive/ui"
|
||||
"github.com/wagoodman/dive/utils"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"github.com/wagoodman/dive/utils"
|
||||
)
|
||||
|
||||
// buildCmd represents the build command
|
||||
|
@ -2,13 +2,13 @@ package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/k0kubun/go-ansi"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
"github.com/tebeka/atexit"
|
||||
"github.com/k0kubun/go-ansi"
|
||||
"os"
|
||||
)
|
||||
|
||||
var cfgFile string
|
||||
|
@ -2,7 +2,6 @@ package ui
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/jroimartin/gocui"
|
||||
"github.com/lunixbochs/vtclean"
|
||||
@ -97,7 +96,7 @@ func (view *DetailsView) Render() error {
|
||||
template := "%5s %12s %-s\n"
|
||||
var trueInefficiencies int
|
||||
inefficiencyReport := fmt.Sprintf(Formatting.Header(template), "Count", "Total Space", "Path")
|
||||
for idx := len(view.inefficiencies) - 1; idx > 0; idx-- {
|
||||
for idx := len(view.inefficiencies) - 1; idx >= 0; idx-- {
|
||||
data := view.inefficiencies[idx]
|
||||
if data.CumulativeSize == 0 {
|
||||
continue
|
||||
|
@ -1,8 +1,8 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -30,4 +30,3 @@ func cleanArgs(s []string) []string {
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user