Skip to content

Commit

Permalink
Remove unused isEmpty function
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Feb 4, 2025
1 parent bcb977b commit b0d1f27
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions pkg/cdi/container-edits.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,33 +220,6 @@ func (e *ContainerEdits) Append(o *ContainerEdits) *ContainerEdits {
return e
}

// isEmpty returns true if these edits are empty. This is valid in a
// global Spec context but invalid in a Device context.
func (e *ContainerEdits) isEmpty() bool {
if e == nil {
return false
}
if len(e.Env) > 0 {
return false
}
if len(e.DeviceNodes) > 0 {
return false
}
if len(e.Hooks) > 0 {
return false
}
if len(e.Mounts) > 0 {
return false
}
if len(e.AdditionalGIDs) > 0 {
return false
}
if e.IntelRdt != nil {
return false
}
return true
}

// ValidateEnv validates the given environment variables.
func ValidateEnv(env []string) error {
for _, v := range env {
Expand Down

0 comments on commit b0d1f27

Please sign in to comment.