We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3333bf9 commit a1784b6Copy full SHA for a1784b6
conv/values.go
@@ -296,6 +296,16 @@ func BoolValueToBoolPtr(v attr.Value) *bool {
296
return vPtr
297
}
298
299
+// BoolPtrToBoolValue accepts a bool pointer, returning a types.Bool with the dereferenced value.
300
+//
301
+// If the provided pointer is nil, the returned Bool type will be set as Null.
302
+func BoolPtrToBoolValue(b *bool) types.Bool {
303
+ if b == nil {
304
+ return types.BoolNull()
305
+ }
306
+ return types.BoolValue(*b)
307
+}
308
+
309
// NumberValueToBigFloat accepts either a types.Number or *types.Number, returning the raw *big.Float value. This may
310
// be nil if the value was not set.
311
func NumberValueToBigFloat(v attr.Value) *big.Float {
0 commit comments