2 parents 887be9c + 3efa432 commit 8bc8bddCopy full SHA for 8bc8bdd
1 file changed
common/atomic_bool.go
@@ -19,7 +19,7 @@ type AtomicBool struct {
19
value uint32
20
}
21
22
-// IsSet returns wether the current boolean value is true.
+// IsSet returns whether the current boolean value is true.
23
func (ab *AtomicBool) IsSet() bool {
24
return atomic.LoadUint32(&ab.value) > 0
25
@@ -33,7 +33,7 @@ func (ab *AtomicBool) Set(value bool) {
33
34
35
36
-// TrySet sets the value of the bool and returns wether the value changed.
+// TrySet sets the value of the bool and returns whether the value changed.
37
func (ab *AtomicBool) TrySet(value bool) bool {
38
if value {
39
return atomic.SwapUint32(&ab.value, 1) == 0
0 commit comments