fix: refs
This commit is contained in:
14
server/refs/bool.go
Normal file
14
server/refs/bool.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package refs
|
||||
|
||||
// NewBoolRef returns a reference to a bool with given value
|
||||
func NewBoolRef(v bool) *bool {
|
||||
return &v
|
||||
}
|
||||
|
||||
// BoolValue returns the value of the given bool ref
|
||||
func BoolValue(r *bool) bool {
|
||||
if r == nil {
|
||||
return false
|
||||
}
|
||||
return *r
|
||||
}
|
Reference in New Issue
Block a user