Skip to content

Commit

Permalink
Add NullableBool function (#1322)
Browse files Browse the repository at this point in the history
<!--
Thank you for your Pull Request. Please provide a description above and
review
the requirements below.

Bug fixes and new features should include tests.
-->

## Motivation

The `AppPortalAccess` function in the golang SDK takes a `ReadOnly`
parameter, of type `NullableBool`. However, the `NullableBool` struct
and associated functions aren't accessible outside the SDK, so it's not
possible to construct a `NullableBool` to pass into this function.

For other types (`NullableString`, `NullableInt32`), there's a set of
wrapper functions defined in the `svix` package.

<!--
Explain the context and why you're making that change. What is the
problem
you're trying to solve? If a new feature is being added, describe the
intended
use case that feature fulfills.
-->

## Solution
Add a `NullableBool` function to the svix package, next to the existing
wrapper functions.

<!--
Summarize the solution and provide any necessary context needed to
understand
the code change.
-->
  • Loading branch information
dacohen authored May 16, 2024
1 parent 51773da commit b8a39cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/svix.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func NullableInt32(num *int32) *openapi.NullableInt32 {
func Int32(i int32) *int32 {
return &i
}
func NullableBool(b *bool) *openapi.NullableBool {
return openapi.NewNullableBool(b)
}

func New(token string, options *SvixOptions) *Svix {
conf := openapi.NewConfiguration()
Expand Down

0 comments on commit b8a39cb

Please sign in to comment.