mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2025-08-18 12:48:12 +02:00
Extend structs rather than embed, when possible
This commit is contained in:
@@ -31,15 +31,15 @@ type Keypair struct {
|
||||
}
|
||||
|
||||
type Keypairs struct {
|
||||
mutex sync.RWMutex
|
||||
sync.RWMutex
|
||||
current *Keypair
|
||||
previous *Keypair
|
||||
next *Keypair
|
||||
}
|
||||
|
||||
func (kp *Keypairs) Current() *Keypair {
|
||||
kp.mutex.RLock()
|
||||
defer kp.mutex.RUnlock()
|
||||
kp.RLock()
|
||||
defer kp.RUnlock()
|
||||
return kp.current
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user