cleanup: use WriteString instead of Write

use WriteString instead of Write  for the temp
files.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2022-01-21 15:04:41 +05:30 committed by mergify[bot]
parent aba6979d29
commit 813f6c30cc

View File

@ -54,7 +54,7 @@ func storeKey(key string) (string, error) {
}
}()
if _, err = tmpfile.Write([]byte(key)); err != nil {
if _, err = tmpfile.WriteString(key); err != nil {
return "", fmt.Errorf("error writing key to temporary keyfile: %w", err)
}