cleanup: fix static checks

fix SA1019 static check to replace
io/utils with os package

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2023-02-01 18:10:01 +01:00
committed by mergify[bot]
parent 8ccf6a805d
commit e9e33fb851
5 changed files with 6 additions and 12 deletions

View File

@ -20,7 +20,6 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"github.com/libopenstorage/secrets/vault"
@ -321,7 +320,7 @@ func (kms *vaultTenantSA) getToken() (string, error) {
// linked from the ServiceAccount. This path can then be used in place of the
// standard `/var/run/secrets/kubernetes.io/serviceaccount/token` location.
func (kms *vaultTenantSA) getTokenPath() (string, error) {
dir, err := ioutil.TempDir("", kms.tenantSAName)
dir, err := os.MkdirTemp("", kms.tenantSAName)
if err != nil {
return "", fmt.Errorf("failed to create directory for ServiceAccount %s/%s: %w", kms.tenantSAName, kms.Tenant, err)
}