mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 15:39:46 +00:00
Fix issues found by staticcheck linter
This commit is contained in:
@@ -4,7 +4,6 @@ package test
|
||||
import (
|
||||
"fmt"
|
||||
"git-get/pkg/run"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -16,7 +15,9 @@ import (
|
||||
func TempDir(t *testing.T, parent string) string {
|
||||
t.Helper()
|
||||
|
||||
dir, err := ioutil.TempDir(parent, "git-get-repo-")
|
||||
// t.TempDir() is not enough in this case, we need to be able to create dirs inside the parent dir
|
||||
//nolint:usetesting
|
||||
dir, err := os.MkdirTemp(parent, "git-get-repo-")
|
||||
checkFatal(t, err)
|
||||
|
||||
// Automatically remove temp dir when the test is over.
|
||||
|
||||
@@ -27,9 +27,7 @@ func Errors(repos []Printable) string {
|
||||
errors := []string{}
|
||||
|
||||
for _, repo := range repos {
|
||||
for _, err := range repo.Errors() {
|
||||
errors = append(errors, err)
|
||||
}
|
||||
errors = append(errors, repo.Errors()...)
|
||||
}
|
||||
|
||||
if len(errors) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user