Skip to content

Commit

Permalink
fix: consistent nil handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tenstad committed Feb 4, 2025
1 parent 50b4a52 commit 2da22f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apis/user/v1alpha1/groupqualityofservicelimits_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
resource "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/utils/ptr"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
Expand All @@ -33,7 +32,7 @@ type Quantity string

func (q *Quantity) ToKiB() (*int64, error) {
if q == nil {
return ptr.To(int64(-1)), nil
return nil, nil
}

rq, err := resource.ParseQuantity(string(*q))
Expand Down

0 comments on commit 2da22f9

Please sign in to comment.