mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 19:54:00 +00:00
delete io/ioutil package. (#5955)
Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
@@ -18,7 +18,6 @@ package install
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -156,7 +155,7 @@ func (o *InstallOptions) AsVeleroOptions() (*install.VeleroOptions, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
secretData, err = ioutil.ReadFile(realPath)
|
||||
secretData, err = os.ReadFile(realPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -167,7 +166,7 @@ func (o *InstallOptions) AsVeleroOptions() (*install.VeleroOptions, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
caCertData, err = ioutil.ReadFile(realPath)
|
||||
caCertData, err = os.ReadFile(realPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -327,7 +326,7 @@ func (o *InstallOptions) Run(c *cobra.Command, f client.Factory) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//Complete completes options for a command.
|
||||
// Complete completes options for a command.
|
||||
func (o *InstallOptions) Complete(args []string, f client.Factory) error {
|
||||
o.Namespace = f.Namespace()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user