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:
parent
c9b5120a9c
commit
d889647f08
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue