(Feat): Initial Commit
This commit is contained in:
11
internal/util/bool.go
Normal file
11
internal/util/bool.go
Normal file
@@ -0,0 +1,11 @@
|
||||
// nolint:revive
|
||||
package util
|
||||
|
||||
// FalseIfNil returns false if the passed pointer is nil. Passing a pointer to a bool will return the value of the bool.
|
||||
func FalseIfNil(b *bool) bool {
|
||||
if b == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return *b
|
||||
}
|
||||
Reference in New Issue
Block a user