Skip to content

Commit bc989da

Browse files
committed
Lint: revive if-return
Signed-off-by: apostasie <[email protected]>
1 parent ebc89dc commit bc989da

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ linters:
121121
disabled: true
122122
- name: unnecessary-stmt
123123
disabled: true
124-
- name: if-return
125-
disabled: true
126124
- name: unchecked-type-assertion
127125
disabled: true
128126
- name: bare-return

pkg/containerutil/container_network_manager.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,7 @@ func (m *noneNetworkManager) SetupNetworking(ctx context.Context, containerID st
240240
}
241241

242242
// Save the meta information
243-
if err = hs.Acquire(hsMeta); err != nil {
244-
return err
245-
}
246-
247-
return nil
243+
return hs.Acquire(hsMeta)
248244
}
249245

250246
// CleanupNetworking Performs any required cleanup actions for the given container.
@@ -269,10 +265,7 @@ func (m *noneNetworkManager) CleanupNetworking(ctx context.Context, container co
269265
}
270266

271267
// Release
272-
if err = hs.Release(container.ID()); err != nil {
273-
return err
274-
}
275-
return nil
268+
return hs.Release(container.ID())
276269
}
277270

278271
// InternalNetworkingOptionLabels Returns the set of NetworkingOptions which should be set as labels on the container.

0 commit comments

Comments
 (0)