Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteaf5922

Browse files
committed
inverse continue/return for clarity
1 parent0b16448 commiteaf5922

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎agent/agentcontainers/watcher/watcher.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ func (f *fsnotifyWatcher) Next(ctx context.Context) (event *fsnotify.Event, err
152152
f.mu.Lock()
153153
isWatched:=f.watchedFiles[absPath]
154154
f.mu.Unlock()
155-
ifisWatched {
156-
return&evt,nil
155+
if!isWatched {
156+
continue// Ignore events for files not being watched.
157157
}
158158

159-
continue// Ignore events for files not being watched.
159+
return&evt,nil
160160

161161
caseerr,ok:=<-f.Errors:
162162
if!ok {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp