Skip to content
Snippets Groups Projects
Commit 16971dbb authored by 邹毅贤's avatar 邹毅贤
Browse files

fix review comment

parent 7e407aba
No related branches found
No related tags found
No related merge requests found
......@@ -17,16 +17,25 @@
package synthesizer
import (
"sync"
)
var (
synthesizers []SubscribedURLsSynthesizer
synthesizers []SubscribedURLsSynthesizer
synthesizerMutex sync.RWMutex
)
// nolint
func AddSynthesizer(synthesizer SubscribedURLsSynthesizer) {
synthesizerMutex.Lock()
defer synthesizerMutex.Unlock()
synthesizers = append(synthesizers, synthesizer)
}
// nolint
func GetAllSynthesizer() []SubscribedURLsSynthesizer {
synthesizerMutex.RLock()
defer synthesizerMutex.RUnlock()
return synthesizers
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment