diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-26 13:02:01 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-26 13:02:01 -1000 |
| commit | b4b663ccb87cbfe7c2bccdca959038e629d09a31 (patch) | |
| tree | 53b63b655be1e46d6331cfb687e2f7286b3f0346 | |
| parent | 2e739638477e87a1b1df662740f191c86db60186 (diff) | |
Fix Google Calendar credential loading
Use option.WithCredentialsFile instead of non-existent
option.WithAuthCredentialsFile function.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| -rw-r--r-- | internal/api/google_calendar.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/api/google_calendar.go b/internal/api/google_calendar.go index e4f9c2f..dc61f3d 100644 --- a/internal/api/google_calendar.go +++ b/internal/api/google_calendar.go @@ -55,8 +55,7 @@ func deduplicateEvents(events []models.CalendarEvent) []models.CalendarEvent { // NewGoogleCalendarClient creates a client that fetches from multiple calendars. // calendarIDs can be comma-separated (e.g., "cal1@group.calendar.google.com,cal2@group.calendar.google.com") func NewGoogleCalendarClient(ctx context.Context, credentialsFile, calendarIDs string) (*GoogleCalendarClient, error) { - // Use type-safe credential loading (replaces deprecated WithCredentialsFile) - srv, err := calendar.NewService(ctx, option.WithAuthCredentialsFile(option.ServiceAccount, credentialsFile)) + srv, err := calendar.NewService(ctx, option.WithCredentialsFile(credentialsFile)) if err != nil { return nil, fmt.Errorf("unable to retrieve Calendar client: %v", err) } |
