1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Fix shadowed variables

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer
2020-05-06 23:11:30 -07:00
parent 62a1c5c97b
commit 06152c7041
7 changed files with 18 additions and 22 deletions

View File

@@ -60,8 +60,8 @@ func (widget *Widget) Fetch() ([]*CalEvent, error) {
calendarIDs, err := widget.getCalendarIdList(srv)
for _, calendarID := range calendarIDs {
calendarEvents, err := srv.Events.List(calendarID).TimeZone(timezone).ShowDeleted(false).TimeMin(startTime).MaxResults(eventLimit).SingleEvents(true).OrderBy("startTime").Do()
if err != nil {
calendarEvents, listErr := srv.Events.List(calendarID).TimeZone(timezone).ShowDeleted(false).TimeMin(startTime).MaxResults(eventLimit).SingleEvents(true).OrderBy("startTime").Do()
if listErr != nil {
break
}
events.Items = append(events.Items, calendarEvents.Items...)

View File

@@ -43,7 +43,7 @@ func (widget *Widget) content() (string, string, bool) {
timestamp = ""
}
title := fmt.Sprintf("[%s]%s",
title = fmt.Sprintf("[%s]%s",
widget.titleColor(calEvent),
widget.eventSummary(calEvent, calEvent.ConflictsWith(calEvents)),
)