Skip to content

Commit

Permalink
sq
Browse files Browse the repository at this point in the history
  • Loading branch information
jamietanna committed Jan 4, 2024
1 parent 4db874b commit e7e109c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/nullable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func ExampleNullable_marshal() {
obj := struct {
ID Nullable[int] `json:"id"`
ID *Nullable[int] `json:"id,omitempty"`
}{}

// when it's not set
Expand All @@ -24,6 +24,7 @@ func ExampleNullable_marshal() {
fmt.Println("---")

// when it's set explicitly to nil
obj.ID = &Nullable[int]{}
obj.ID.Value = nil
obj.ID.Set = true

Expand Down

0 comments on commit e7e109c

Please sign in to comment.