mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Cleanup CopyFile
This commit is contained in:
parent
575031b68f
commit
3a54e3e56a
@ -36,7 +36,10 @@ func SetKubernetesVersion(cfg *kubeadmapiv1.ClusterConfiguration) {
|
|||||||
|
|
||||||
// CopyFile copy file from src to dest.
|
// CopyFile copy file from src to dest.
|
||||||
func CopyFile(src, dest string) error {
|
func CopyFile(src, dest string) error {
|
||||||
fileInfo, _ := os.Stat(src)
|
fileInfo, err := os.Stat(src)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
contents, err := os.ReadFile(src)
|
contents, err := os.ReadFile(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user