summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--internal/testanalyze/analyze.go6
-rw-r--r--pkg/remove/parallel.go2
-rw-r--r--pkg/remove/remove.go4
-rw-r--r--stdout/stdout.go2
-rw-r--r--tui/exec.go2
5 files changed, 8 insertions, 8 deletions
diff --git a/internal/testanalyze/analyze.go b/internal/testanalyze/analyze.go
index 3bb0532..d0f2bdb 100644
--- a/internal/testanalyze/analyze.go
+++ b/internal/testanalyze/analyze.go
@@ -85,18 +85,18 @@ func (a *MockedAnalyzer) ResetProgress() {}
func (a *MockedAnalyzer) SetFollowSymlinks(v bool) {}
// RemoveItemFromDirWithErr returns error
-func RemoveItemFromDirWithErr(dir fs.Item, file fs.Item) error {
+func RemoveItemFromDirWithErr(dir, file fs.Item) error {
return errors.New("Failed")
}
// RemoveItemFromDirWithSleep returns error
-func RemoveItemFromDirWithSleep(dir fs.Item, file fs.Item) error {
+func RemoveItemFromDirWithSleep(dir, file fs.Item) error {
time.Sleep(time.Millisecond * 600)
return remove.RemoveItemFromDir(dir, file)
}
// RemoveItemFromDirWithSleepAndErr returns error
-func RemoveItemFromDirWithSleepAndErr(dir fs.Item, file fs.Item) error {
+func RemoveItemFromDirWithSleepAndErr(dir, file fs.Item) error {
time.Sleep(time.Millisecond * 600)
return errors.New("Failed")
}
diff --git a/pkg/remove/parallel.go b/pkg/remove/parallel.go
index d5dd11e..27a43ea 100644
--- a/pkg/remove/parallel.go
+++ b/pkg/remove/parallel.go
@@ -11,7 +11,7 @@ import (
var concurrencyLimit = make(chan struct{}, 3*runtime.GOMAXPROCS(0))
// RemoveItemFromDirParallel removes item from dir
-func RemoveItemFromDirParallel(dir fs.Item, item fs.Item) error {
+func RemoveItemFromDirParallel(dir, item fs.Item) error {
if !item.IsDir() {
return RemoveItemFromDir(dir, item)
}
diff --git a/pkg/remove/remove.go b/pkg/remove/remove.go
index 1d17985..9fba6d4 100644
--- a/pkg/remove/remove.go
+++ b/pkg/remove/remove.go
@@ -8,7 +8,7 @@ import (
)
// RemoveItemFromDir removes item from dir
-func RemoveItemFromDir(dir fs.Item, item fs.Item) error {
+func RemoveItemFromDir(dir, item fs.Item) error {
err := os.RemoveAll(item.GetPath())
if err != nil {
return err
@@ -19,7 +19,7 @@ func RemoveItemFromDir(dir fs.Item, item fs.Item) error {
}
// EmptyFileFromDir empty file from dir
-func EmptyFileFromDir(dir fs.Item, file fs.Item) error {
+func EmptyFileFromDir(dir, file fs.Item) error {
err := os.Truncate(file.GetPath(), 0)
if err != nil {
return err
diff --git a/stdout/stdout.go b/stdout/stdout.go
index 5b1ecba..669fc69 100644
--- a/stdout/stdout.go
+++ b/stdout/stdout.go
@@ -440,7 +440,7 @@ func maxLength(list []*device.Device, keyGetter func(*device.Device) string) int
return maxLen
}
-func maxInt(x int, y int) int {
+func maxInt(x, y int) int {
if x > y {
return x
}
diff --git a/tui/exec.go b/tui/exec.go
index 7e5af29..24c3e11 100644
--- a/tui/exec.go
+++ b/tui/exec.go
@@ -6,7 +6,7 @@ import (
)
// Execute runs given bin path via exec.Command call
-func Execute(argv0 string, argv []string, envv []string) error {
+func Execute(argv0 string, argv, envv []string) error {
cmd := exec.Command(argv0, argv...)
cmd.Stdout = os.Stdout