mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-12-02 20:02:53 +00:00
15 lines
238 B
Go
15 lines
238 B
Go
package nullable
|
|
|
|
// Bool is a nullable version of a bool.
|
|
type Bool *bool
|
|
|
|
var (
|
|
True = newBool(true)
|
|
False = newBool(false)
|
|
)
|
|
|
|
// newBool creates a new Bool with the value of the passed bool.
|
|
func newBool(b bool) Bool {
|
|
return &b
|
|
}
|