Skip to content

Commit f7c9319

Browse files
committed
lint: avoid revive package-comments rule on observer.go
The comment block above 'package shutdown' in observer.go was treated as a package doc comment, which revive requires to start with 'Package shutdown ...'. doc.go already provides that canonical package doc. Move the fan-out rationale below the package declaration as a regular block comment — same documentation value, no revive collision.
1 parent 453d2a7 commit f7c9319

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

observer.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
// observer.go — synchronous fan-out helpers for the Observer pattern.
2-
//
3-
// All fire* methods take a snapshot of the observer slice under the
4-
// manager's read lock before invoking, so a Subscribe call concurrent
5-
// with shutdown can't cause a torn iteration. Observers fire
6-
// synchronously: a slow observer slows shutdown — adapters that need
7-
// async work should fan out to a goroutine themselves.
81
package shutdown
92

103
import (
114
"os"
125
"time"
136
)
147

8+
// Observer fan-out helpers.
9+
//
10+
// All fire* methods take a snapshot of the observer slice under the
11+
// manager's read lock before invoking, so a Subscribe call concurrent
12+
// with shutdown can't cause a torn iteration. Observers fire
13+
// synchronously: a slow observer slows shutdown — adapters that need
14+
// async work should fan out to a goroutine themselves.
15+
1516
// fireOnSignal invokes each observer's OnSignal hook.
1617
func (m *Manager) fireOnSignal(sig os.Signal) {
1718
m.mu.RLock()

0 commit comments

Comments
 (0)