mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-22 13:17:07 +00:00
style: remove redundant judgment
Signed-off-by: cndoit18 <cndoit18@outlook.com> Kubernetes-commit: ec43037d0f57fdfc2fdc4960fdb8a7e31ac79fae
This commit is contained in:
parent
d5e58631fd
commit
bcd2e6c7da
@ -571,10 +571,7 @@ func LoadTLSFiles(c *Config) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile)
|
c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile)
|
||||||
if err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
|
// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
|
||||||
|
@ -157,10 +157,7 @@ func loadTLSFiles(c *Config) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile)
|
c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile)
|
||||||
if err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
|
// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
|
||||||
|
Loading…
Reference in New Issue
Block a user