Skip to content

Commit ffad6d7

Browse files
committed
Fix linter
1 parent a424b36 commit ffad6d7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

secure_storage_manager.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ func (ssm *fileBasedSecureStorageManager) readTemporaryCacheFile(cacheFile *os.F
377377
credentialsMap := map[string]any{}
378378
err = json.Unmarshal(jsonData, &credentialsMap)
379379
if err != nil {
380-
return map[string]any{}, fmt.Errorf("Failed to unmarshal credential cache file. %v.\n", err)
380+
return map[string]any{}, fmt.Errorf("failed to unmarshal credential cache file. %v", err)
381381
}
382382

383383
return credentialsMap, nil
@@ -428,7 +428,6 @@ func (ssm *fileBasedSecureStorageManager) writeTemporaryCacheFile(cache map[stri
428428
if err != nil {
429429
return fmt.Errorf("failed to write the credential cache file: %w", err)
430430
}
431-
cacheFile.Seek(0, 0)
432431
return nil
433432
}
434433

secure_storage_manager_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ func TestSnowflakeFileBasedSecureStorageManager(t *testing.T) {
135135
assertNilF(t, os.Remove(ssm.lockPath()))
136136
}()
137137
ssm.setCredential(tokenSpec, "unlocked")
138-
totalDurationMillis := time.Now().Sub(startTime).Milliseconds()
138+
totalDurationMillis := time.Since(startTime).Milliseconds()
139139
assertEqualE(t, ssm.getCredential(tokenSpec), "unlocked")
140-
println(totalDurationMillis)
141140
assertTrueE(t, totalDurationMillis > 1000 && totalDurationMillis < 1200)
142141
})
143142

0 commit comments

Comments
 (0)