Skip to content

Commit

Permalink
[go] Fix panic from marshalling Nil NullableTime
Browse files Browse the repository at this point in the history
  • Loading branch information
ashb committed Feb 3, 2024
1 parent 5397f64 commit 299bd29
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func NewNullableTime(val *time.Time) *NullableTime {
}

func (v NullableTime) MarshalJSON() ([]byte, error) {
return v.value.MarshalJSON()
return json.Marshal(v.value)
}

func (v *NullableTime) UnmarshalJSON(src []byte) error {
Expand Down
2 changes: 1 addition & 1 deletion samples/client/echo_api/go/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/client/petstore/go/go-petstore/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion samples/openapi3/client/petstore/go/go-petstore/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 299bd29

Please sign in to comment.