fix: all issues by golangci-lint

This commit is contained in:
verse91
2026-05-09 23:49:33 +07:00
parent e587f02798
commit c76541258a
18 changed files with 118 additions and 79 deletions
+3 -3
View File
@@ -16,12 +16,12 @@ func TestZoxideGenerator(t *testing.T) {
// Script that prints mock directories
script := "#!/bin/sh\necho \"/home/verse/project1\n/home/verse/docs\n/home/verse/dev/iris\""
os.WriteFile(mockZoxide, []byte(script), 0755)
_ = os.WriteFile(mockZoxide, []byte(script), 0755)
// Add tmp to PATH
oldPath := os.Getenv("PATH")
os.Setenv("PATH", tmp+string(os.PathListSeparator)+oldPath)
defer os.Setenv("PATH", oldPath)
_ = os.Setenv("PATH", tmp+string(os.PathListSeparator)+oldPath)
defer func() { _ = os.Setenv("PATH", oldPath) }()
gen := fs.ZoxideGenerator()