cleanup: use 0o600 intead of 0600

as we are using 0o600 in multiple files
use the same in all files which also fixes
go lint issue.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2022-01-21 15:07:41 +05:30 committed by mergify[bot]
parent c67bacdb11
commit 4938fc2ff4
2 changed files with 2 additions and 2 deletions

View File

@ -320,7 +320,7 @@ func (kms *VaultTenantSA) getTokenPath() (string, error) {
return "", err
}
err = os.WriteFile(dir+"/token", []byte(token), 0600)
err = os.WriteFile(dir+"/token", []byte(token), 0o600)
if err != nil {
return "", fmt.Errorf("failed to write token for ServiceAccount %s/%s: %w", kms.tenantSAName, kms.Tenant, err)
}

View File

@ -1672,7 +1672,7 @@ func updateRBDImageMetadataStash(metaDataPath, device string) error {
}
fPath := filepath.Join(metaDataPath, stashFileName)
err = os.WriteFile(fPath, encodedBytes, 0600)
err = os.WriteFile(fPath, encodedBytes, 0o600)
if err != nil {
return fmt.Errorf("failed to stash JSON image metadata at path: (%s) for spec:(%s) : %w",
fPath, imgMeta.String(), err)