fix: refs

This commit is contained in:
Lakhan Samani
2022-07-15 22:11:08 +05:30
parent fed092bb65
commit 847c364ad1
16 changed files with 142 additions and 125 deletions

14
server/refs/bool.go Normal file
View 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
}