From 761d27a83d62912e2707441b5774edb194aa37c8 Mon Sep 17 00:00:00 2001 From: Steffen Windoffer Date: Wed, 19 Oct 2022 22:09:09 +0200 Subject: [PATCH] replace ioutil function with function from os package --- pkg/client/vault/vault.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/vault/vault.go b/pkg/client/vault/vault.go index 9b12ea0..8dcedd1 100644 --- a/pkg/client/vault/vault.go +++ b/pkg/client/vault/vault.go @@ -2,7 +2,7 @@ package vault import ( "fmt" - "io/ioutil" + "os" vault "github.com/hashicorp/vault/api" "github.com/spf13/viper" @@ -26,7 +26,7 @@ func NewVaultClient() (*vault.Client, error) { if token := viper.GetString("vault_token"); token != "" { client.SetToken(token) } else if role := viper.GetString("vault_kube_auth_role"); role != "" { - jwt, err := ioutil.ReadFile(k8sServiceAccountFile) + jwt, err := os.ReadFile(k8sServiceAccountFile) if err != nil { return nil, fmt.Errorf("failed to read k8s service account: %w", err) }