From 813f6c30cc6ef79b7797f20c8427fc86036aeb12 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Fri, 21 Jan 2022 15:04:41 +0530 Subject: [PATCH] cleanup: use WriteString instead of Write use WriteString instead of Write for the temp files. Signed-off-by: Madhu Rajanna --- internal/util/credentials.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/util/credentials.go b/internal/util/credentials.go index ad8fa6d6e..b189c6c9d 100644 --- a/internal/util/credentials.go +++ b/internal/util/credentials.go @@ -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) }