Skip to content

Commit

Permalink
Remove unnecessary nil checking
Browse files Browse the repository at this point in the history
  • Loading branch information
glrf committed Aug 23, 2021
1 parent 80f4541 commit 6cade04
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/api/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,8 @@ func NewCRDFromAPICluster(apiCluster Cluster) (*synv1alpha1.Cluster, error) {
cluster.Spec.GitHostKeys = *apiCluster.GitRepo.HostKeys
}

if err := SyncCRDFromAPICluster(apiCluster.ClusterProperties, cluster); err != nil {
return cluster, err
}

return cluster, nil
err := SyncCRDFromAPICluster(apiCluster.ClusterProperties, cluster)
return cluster, err
}

func SyncCRDFromAPICluster(source ClusterProperties, target *synv1alpha1.Cluster) error {
Expand Down

0 comments on commit 6cade04

Please sign in to comment.