mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-24 06:07:48 +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,11 +571,8 @@ func LoadTLSFiles(c *Config) error {
|
||||
}
|
||||
|
||||
c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
|
||||
// or an error if an error occurred reading the file
|
||||
|
@ -157,11 +157,8 @@ func loadTLSFiles(c *Config) error {
|
||||
}
|
||||
|
||||
c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,
|
||||
// or an error if an error occurred reading the file
|
||||
|
Loading…
Reference in New Issue
Block a user