Skip to content

Commit b0d1f27

Browse files
committed
Remove unused isEmpty function
Signed-off-by: Evan Lezar <[email protected]>
1 parent bcb977b commit b0d1f27

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

pkg/cdi/container-edits.go

-27
Original file line numberDiff line numberDiff line change
@@ -220,33 +220,6 @@ func (e *ContainerEdits) Append(o *ContainerEdits) *ContainerEdits {
220220
return e
221221
}
222222

223-
// isEmpty returns true if these edits are empty. This is valid in a
224-
// global Spec context but invalid in a Device context.
225-
func (e *ContainerEdits) isEmpty() bool {
226-
if e == nil {
227-
return false
228-
}
229-
if len(e.Env) > 0 {
230-
return false
231-
}
232-
if len(e.DeviceNodes) > 0 {
233-
return false
234-
}
235-
if len(e.Hooks) > 0 {
236-
return false
237-
}
238-
if len(e.Mounts) > 0 {
239-
return false
240-
}
241-
if len(e.AdditionalGIDs) > 0 {
242-
return false
243-
}
244-
if e.IntelRdt != nil {
245-
return false
246-
}
247-
return true
248-
}
249-
250223
// ValidateEnv validates the given environment variables.
251224
func ValidateEnv(env []string) error {
252225
for _, v := range env {

0 commit comments

Comments
 (0)