e6956aa001
- React frontend with route-level code splitting - Backend rebranded from Baihu to TaskPool - DB brand migration script and local compatibility
15 lines
273 B
Go
15 lines
273 B
Go
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
|
|
}
|