mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-06 09:17:10 +08:00
reformat code
This commit is contained in:
@@ -4,16 +4,14 @@ import "sync/atomic"
|
||||
|
||||
type AtomicBool uint32
|
||||
|
||||
func (b *AtomicBool)Get()bool {
|
||||
return atomic.LoadUint32((*uint32)(b)) != 0
|
||||
func (b *AtomicBool) Get() bool {
|
||||
return atomic.LoadUint32((*uint32)(b)) != 0
|
||||
}
|
||||
|
||||
func (b *AtomicBool)Set(v bool) {
|
||||
if v {
|
||||
atomic.StoreUint32((*uint32)(b), 1)
|
||||
} else {
|
||||
atomic.StoreUint32((*uint32)(b), 0)
|
||||
}
|
||||
func (b *AtomicBool) Set(v bool) {
|
||||
if v {
|
||||
atomic.StoreUint32((*uint32)(b), 1)
|
||||
} else {
|
||||
atomic.StoreUint32((*uint32)(b), 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user