chore: trt to fix restore bool val #70

This commit is contained in:
duorameng
2026-04-18 13:04:53 +08:00
parent 1bd7082f33
commit 4b644e272e
17 changed files with 62 additions and 45 deletions
+14
View File
@@ -0,0 +1,14 @@
package utils
// BoolPtr returns a pointer to the bool value
func BoolPtr(b bool) *bool {
return &b
}
// DerefBool returns the value of the bool pointer or default if nil
func DerefBool(b *bool, defaultVal bool) bool {
if b == nil {
return defaultVal
}
return *b
}