Skip to content

Commit

Permalink
Remove superfluous nil check
Browse files Browse the repository at this point in the history
The profile cannot be nil, as this has been checked a couple of lines
earlier.

Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed Mar 28, 2024
1 parent 378f47b commit e777ac5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/component/worker/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ func ToConfigMapData(profile *Profile) (map[string]string, error) {

data := make(map[string]string)

if profile == nil {
return data, nil
}

var errs error
forEachConfigMapEntry(profile, func(fieldName string, ptr any) {
if reflect.ValueOf(ptr).Elem().IsZero() {
Expand Down

0 comments on commit e777ac5

Please sign in to comment.