Skip to content

Commit

Permalink
Use empty slice instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
baijum committed Jun 7, 2021
1 parent 588535c commit 538772c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/reconcile/pipeline/context/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ func (i *impl) Applications() ([]pipeline.Application, error) {

objList, err := i.client.Resource(*gvr).Namespace(i.serviceBinding.Namespace).List(context.Background(), opts)
if err != nil {
return nil, err
emptyResult := make([]pipeline.Application, 0)
return emptyResult, err
}

if len(objList.Items) == 0 {
Expand Down

0 comments on commit 538772c

Please sign in to comment.