fix: handle error returns from os.Unsetenv and file.Close (errcheck)
Fixed the first five errcheck linter errors: - Added error handling for os.Unsetenv in cli_test.go - Added error handling for file.Close() in crypto.go (4 instances)
This commit is contained in:
@@ -47,7 +47,7 @@ func TestDetermineStateDir(t *testing.T) {
|
||||
}
|
||||
|
||||
// Test with custom config dir
|
||||
os.Unsetenv(secret.EnvStateDir)
|
||||
_ = os.Unsetenv(secret.EnvStateDir)
|
||||
customConfigDir := "/custom-config"
|
||||
stateDir = secret.DetermineStateDir(customConfigDir)
|
||||
expectedDir := filepath.Join(customConfigDir, secret.AppID)
|
||||
|
||||
Reference in New Issue
Block a user