Skip to content

Commit

Permalink
fixed minor misspellings, formatting and duplicit declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Jun 7, 2021
1 parent 549e54d commit d11b241
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion internal/common/ignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (ui *UI) ShouldDirBeIgnoredUsingPattern(name, path string) bool {
return shouldIgnore
}

// IsHiddenDir returns if the dir name beggins with dot
// IsHiddenDir returns if the dir name begins with dot
func (ui *UI) IsHiddenDir(name, path string) bool {
shouldIgnore := name[0] == '.'
if shouldIgnore {
Expand Down
4 changes: 2 additions & 2 deletions internal/testanalyze/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"github.com/dundee/gdu/v5/pkg/analyze"
)

// MockedAnalyzer returns dir with files with diferent size exponents
// MockedAnalyzer returns dir with files with different size exponents
type MockedAnalyzer struct{}

// AnalyzeDir returns dir with files with diferent size exponents
// AnalyzeDir returns dir with files with different size exponents
func (a *MockedAnalyzer) AnalyzeDir(path string, ignore analyze.ShouldDirBeIgnored) *analyze.Dir {
dir := &analyze.Dir{
File: &analyze.File{
Expand Down
6 changes: 3 additions & 3 deletions pkg/analyze/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type CurrentProgress struct {
TotalSize int64
}

var concurrencyLimit chan struct{} = make(chan struct{}, 3*runtime.GOMAXPROCS(0))
var concurrencyLimit = make(chan struct{}, 3*runtime.GOMAXPROCS(0))

// ShouldDirBeIgnored whether path should be ignored
type ShouldDirBeIgnored func(name, path string) bool
Expand Down Expand Up @@ -94,8 +94,8 @@ func (a *ParallelAnalyzer) processDir(path string) *Dir {
err error
totalSize int64
info os.FileInfo
subDirChan chan *Dir = make(chan *Dir)
dirCount int = 0
subDirChan = make(chan *Dir)
dirCount int
)

a.wait.Add(1)
Expand Down
2 changes: 1 addition & 1 deletion pkg/device/dev_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func readMountOutput(rdr io.Reader) (Devices, error) {
return nil, errors.New("Cannot parse mount output")
}

fstype := parts[3][1:len(parts[3])-1]
fstype := parts[3][1 : len(parts[3])-1]

device := &Device{
Name: parts[0],
Expand Down
5 changes: 1 addition & 4 deletions tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ func CreateUI(app common.TermApplication, useColors bool, showApparentSize bool)

// StartUILoop starts tview application
func (ui *UI) StartUILoop() error {
if err := ui.app.Run(); err != nil {
return err
}
return nil
return ui.app.Run()
}

func (ui *UI) rescanDir() {
Expand Down

0 comments on commit d11b241

Please sign in to comment.