Add Exists method to Optional
This commit is contained in:
parent
925e011465
commit
e2b3b84993
@ -149,3 +149,8 @@ func (this *Optional[T]) Unset () {
|
||||
this.value = zero
|
||||
this.exists = false
|
||||
}
|
||||
|
||||
// Exists returns if the value is currently set.
|
||||
func (this *Optional[T]) Exists () bool {
|
||||
return this.exists
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user