cleanup: address ifshort linter issues

This commit addresses ifshort linter issues which
checks if short syntax for if-statements is possible.

updates: #1586

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2021-05-06 15:19:27 +05:30
committed by mergify[bot]
parent 6618e2012d
commit b891e5585d
9 changed files with 10 additions and 19 deletions

View File

@ -210,8 +210,7 @@ func execCommandInPodAndAllowFail(f *framework.Framework, c, ns string, opt *met
func loadApp(path string) (*v1.Pod, error) {
app := v1.Pod{}
err := unmarshal(path, &app)
if err != nil {
if err := unmarshal(path, &app); err != nil {
return nil, err
}
for i := range app.Spec.Containers {

View File

@ -27,8 +27,7 @@ func upgradeCSI(version string) error {
// upgradeAndDeployCSI upgrades the CSI to a specific release.
func upgradeAndDeployCSI(version, testtype string) error {
err := upgradeCSI(version)
if err != nil {
if err := upgradeCSI(version); err != nil {
return fmt.Errorf("failed to upgrade driver %w", err)
}
switch testtype {