Skip to content

Commit b8a39cb

Browse files
authored
Add NullableBool function (#1322)
<!-- 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. -->
1 parent 51773da commit b8a39cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/svix.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ func NullableInt32(num *int32) *openapi.NullableInt32 {
4747
func Int32(i int32) *int32 {
4848
return &i
4949
}
50+
func NullableBool(b *bool) *openapi.NullableBool {
51+
return openapi.NewNullableBool(b)
52+
}
5053

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

0 commit comments

Comments
 (0)