Skip to content

Commit 0203aa6

Browse files
committed
Fix linter
1 parent b574a79 commit 0203aa6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

secure_storage_manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func (ssm *fileBasedSecureStorageManager) ensurePermissions() error {
296296
}
297297

298298
if fileInfo.Mode().Perm() != 0o600&os.ModePerm {
299-
return fmt.Errorf("Incorrect permissions(%v, expected 600) for credential file.", fileInfo.Mode().Perm())
299+
return fmt.Errorf("incorrect permissions(%v, expected 600) for credential file", fileInfo.Mode().Perm())
300300

301301
}
302302

secure_storage_manager_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ func TestSnowflakeFileBasedSecureStorageManager(t *testing.T) {
139139
assertEqualE(t, ssm.getCredential(tokenSpec), "initialValue")
140140
err = os.Chmod(ssm.credFilePath(), 0644)
141141
assertNilF(t, err)
142-
defer os.Chmod(ssm.credFilePath(), 0600)
142+
defer func() {
143+
assertNilE(t, os.Chmod(ssm.credFilePath(), 0600))
144+
}()
143145
ssm.setCredential(tokenSpec, "newValue")
144146
assertEqualE(t, ssm.getCredential(tokenSpec), "")
145147
fileContent, err := os.ReadFile(ssm.credFilePath())

0 commit comments

Comments
 (0)