mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-06 14:03:58 +00:00
BREAKING CHANGE: introduces sdn support. Signed-off-by: MacherelR <64424331+MacherelR@users.noreply.github.com>
34 lines
412 B
Go
34 lines
412 B
Go
package ptrConversion
|
|
|
|
func BoolToInt64Ptr(boolPtr *bool) *int64 {
|
|
if boolPtr != nil {
|
|
var result int64
|
|
|
|
if *boolPtr {
|
|
result = int64(1)
|
|
} else {
|
|
result = int64(0)
|
|
}
|
|
|
|
return &result
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func Int64ToBoolPtr(int64ptr *int64) *bool {
|
|
if int64ptr != nil {
|
|
var result bool
|
|
|
|
if *int64ptr == 0 {
|
|
result = false
|
|
} else {
|
|
result = true
|
|
}
|
|
|
|
return &result
|
|
}
|
|
|
|
return nil
|
|
}
|