1
0
Fork 0
mirror of https://github.com/Luzifer/webcheck.git synced 2024-11-09 23:20:03 +00:00

Fix "passes lock by value"

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-07-23 15:00:37 +02:00
parent c9b5120a9c
commit d889647f08
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -78,7 +78,7 @@ func (c *checkResult) AddDuration(d time.Duration) {
c.Durations = append(c.Durations, d) c.Durations = append(c.Durations, d)
} }
func (c checkResult) DurationStats() string { func (c *checkResult) DurationStats() string {
c.lock.RLock() c.lock.RLock()
defer c.lock.RUnlock() defer c.lock.RUnlock()
@ -104,7 +104,7 @@ func (c checkResult) DurationStats() string {
) )
} }
func (c checkResult) Equals(r *checkResult) bool { func (c *checkResult) Equals(r *checkResult) bool {
return c.Status == r.Status && c.Message == r.Message return c.Status == r.Status && c.Message == r.Message
} }