Skip to content

Commit 71b5446

Browse files
fix(gmail): resolve remaining variable shadowing lint warnings
Rename inner `err` to `updateErr` in two additional store.Update() calls to avoid shadowing outer variables, completing the fix from commit 71714ae. Both locations now match the established pattern. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 71714ae commit 71b5446

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

internal/cmd/gmail_watch_server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ func (s *gmailWatchServer) handlePush(ctx context.Context, payload gmailPushPayl
207207
if err != nil {
208208
return nil, err
209209
}
210-
if err := store.Update(func(state *gmailWatchState) error {
210+
if updateErr := store.Update(func(state *gmailWatchState) error {
211211
return updateStateAfterHistory(state, nextHistoryID, payload.MessageID)
212-
}); err != nil {
213-
s.warnf("watch: failed to update state: %v", err)
212+
}); updateErr != nil {
213+
s.warnf("watch: failed to update state: %v", updateErr)
214214
}
215215

216216
return &gmailHookPayload{
@@ -238,10 +238,10 @@ func (s *gmailWatchServer) resyncHistory(ctx context.Context, svc *gmail.Service
238238
return nil, err
239239
}
240240

241-
if err := s.store.Update(func(state *gmailWatchState) error {
241+
if updateErr := s.store.Update(func(state *gmailWatchState) error {
242242
return updateStateAfterHistory(state, historyID, messageID)
243-
}); err != nil {
244-
s.warnf("watch: failed to update state after resync: %v", err)
243+
}); updateErr != nil {
244+
s.warnf("watch: failed to update state after resync: %v", updateErr)
245245
}
246246

247247
return &gmailHookPayload{

0 commit comments

Comments
 (0)