fix: update drifted line citations in patterns.md

Two citations were out of bounds against kubernetes/kubernetes HEAD:

- delta_fifo.go:797-801 → 797-800 (DeletedFinalStateUnknown struct ends
  at line 800; file has 800 lines total, off-by-one)

- kube_features.go:2798-2811 → 2771-2784 (init() function moved up ~27
  lines; file now has 2784 lines, old citation was past EOF)

Audited all 30 citations (28 OK, 2 fixed, 0 flagged for review).
This commit is contained in:
Rodin
2026-05-06 17:17:03 -07:00
parent bfe1bf6366
commit 6fb1fcdebd
+4 -4
View File
@@ -428,7 +428,7 @@ func (q *rateLimitingType[T]) AddRateLimited(item T) {
## 4. Tombstone Pattern (DeletedFinalStateUnknown)
**Source:** `staging/src/k8s.io/client-go/tools/cache/delta_fifo.go` (lines 797801)
**Source:** `staging/src/k8s.io/client-go/tools/cache/delta_fifo.go` (lines 797800)
### What it does
When a watch disconnects and reconnects, some delete events may be missed. The DeltaFIFO synthesizes a `DeletedFinalStateUnknown` ("tombstone") containing the last known state of the object.
@@ -437,7 +437,7 @@ When a watch disconnects and reconnects, some delete events may be missed. The D
Without this, controllers would never learn about deletions that happened during disconnects.
```go
// staging/src/k8s.io/client-go/tools/cache/delta_fifo.go:797-801
// staging/src/k8s.io/client-go/tools/cache/delta_fifo.go:797-800
type DeletedFinalStateUnknown struct {
Key string
Obj interface{}
@@ -852,7 +852,7 @@ func (le *LeaderElector) Run(ctx context.Context) {
## 8. Feature Gates Pattern
**Source:** `pkg/features/kube_features.go` (lines 342811), `staging/src/k8s.io/client-go/features/features.go` (lines 3480)
**Source:** `pkg/features/kube_features.go` (lines 342784), `staging/src/k8s.io/client-go/features/features.go` (lines 3480)
### What it does
A global registry of boolean flags that control feature rollout. Features progress through Alpha → Beta → GA → Deprecated lifecycle stages.
@@ -888,7 +888,7 @@ const (
### Registration at init()
```go
// pkg/features/kube_features.go:2798-2811
// pkg/features/kube_features.go:2771-2784
func init() {
ca := &clientAdapter{utilfeature.DefaultMutableFeatureGate}
runtime.Must(clientfeatures.AddVersionedFeaturesToExistingFeatureGates(ca))