Skip to content

Commit c2e2e61

Browse files
committed
fix, add boolVal
1 parent b234364 commit c2e2e61

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

provider/resource/util.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ func equalSlicePtr(sliceA, sliceB *[]string) bool {
5959

6060
return equalSlice(*sliceA, *sliceB)
6161
}
62+
63+
// boolVal safely converts a pointer to bool to a bool value.
64+
func boolVal(p *bool) bool {
65+
if p == nil {
66+
return false
67+
}
68+
69+
return *p
70+
}

0 commit comments

Comments
 (0)