Skip to content

Commit 10f604e

Browse files
committed
fix: add GUARDED_BY annotations to readiness Gate fields
Add required mutex guard annotations for the lint analyzer.
1 parent 6b43353 commit 10f604e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/middleware/readiness/readiness.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ type Gate struct {
4747
sfGroup singleflight.Group
4848

4949
mu sync.RWMutex
50-
cachedReady bool
51-
cachedMessage string
52-
cacheTime time.Time
50+
cachedReady bool // GUARDED_BY(mu)
51+
cachedMessage string // GUARDED_BY(mu)
52+
cacheTime time.Time // GUARDED_BY(mu)
5353
}
5454

5555
// NewGate creates a new readiness gate with the given checker.

0 commit comments

Comments
 (0)