mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2025-08-21 22:29:55 +02:00
Use RWMutex instead of Mutex
This commit is contained in:
parent
e589709c4f
commit
09d6340ce8
2
cert.go
2
cert.go
@ -30,7 +30,7 @@ type CertificateDir struct {
|
||||
CertificateStore
|
||||
dir bool
|
||||
path string
|
||||
mu sync.Mutex
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
// Add adds a certificate for the given scope to the store.
|
||||
|
2
tofu.go
2
tofu.go
@ -31,7 +31,7 @@ type KnownHosts map[string]Fingerprint
|
||||
type KnownHostsFile struct {
|
||||
KnownHosts
|
||||
out io.Writer
|
||||
mu sync.Mutex
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
// SetOutput sets the output to which new known hosts will be written to.
|
||||
|
Loading…
Reference in New Issue
Block a user