Skip to content

Commit 71714ae

Browse files
fix(gmail): resolve variable shadowing lint warning
Rename inner `err` to `updateErr` to avoid shadowing the outer variable, satisfying golangci-lint's govet shadow checker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6553de8 commit 71714ae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/cmd/gmail_watch_server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ func (s *gmailWatchServer) handlePush(ctx context.Context, payload gmailPushPayl
194194
nextHistoryID = formatHistoryID(historyResp.HistoryId)
195195
}
196196
if len(s.cfg.HistoryTypes) > 0 && (historyResp == nil || len(historyResp.History) == 0) {
197-
if err := store.Update(func(state *gmailWatchState) error {
197+
if updateErr := store.Update(func(state *gmailWatchState) error {
198198
return updateStateAfterHistory(state, nextHistoryID, payload.MessageID)
199-
}); err != nil {
200-
s.warnf("watch: failed to update state: %v", err)
199+
}); updateErr != nil {
200+
s.warnf("watch: failed to update state: %v", updateErr)
201201
}
202202
return nil, errNoNewMessages
203203
}

0 commit comments

Comments
 (0)