Hi! First off, thank you for gog—it’s been super useful.
Summary
When creating a Google Calendar event with a custom reminder of 0 minutes (i.e., "at start time"), gog calendar create fails with:
Google API error (400 required): Missing override reminder minutes.
Repro
gog calendar create <calendarId> \
--account <account> \
--summary "Reminder 0m test" \
--from 2026-02-17T17:00:00+09:00 \
--to 2026-02-17T17:00:00+09:00 \
--reminder popup:0m
Expected
Event is created with an override reminder at exactly start time (0 minutes).
Actual
Command fails with 400:
Missing override reminder minutes.
Notes / Investigation
Looking at internal/cmd/calendar_build.go:
parseDuration() allows 0 (range is 0-40320 minutes)
buildReminders() builds calendar.EventReminder{ Minutes: minutes }, but when minutes == 0, the generated JSON likely omits the minutes field (Go zero-value / omitempty behavior), so the Google Calendar API receives an override reminder without minutes, and rejects it.
In contrast, using popup:1m works fine.
Possible fix
Force-send minutes when it is 0, e.g. set ForceSendFields: []string{"Minutes"} on calendar.EventReminder when minutes == 0 (or always).
Happy to test a patch if you’d like.
Thanks!
Hi! First off, thank you for
gog—it’s been super useful.Summary
When creating a Google Calendar event with a custom reminder of 0 minutes (i.e., "at start time"),
gog calendar createfails with:Repro
Expected
Event is created with an override reminder at exactly start time (0 minutes).
Actual
Command fails with 400:
Missing override reminder minutes.Notes / Investigation
Looking at
internal/cmd/calendar_build.go:parseDuration()allows0(range is0-40320minutes)buildReminders()buildscalendar.EventReminder{ Minutes: minutes }, but whenminutes == 0, the generated JSON likely omits theminutesfield (Go zero-value /omitemptybehavior), so the Google Calendar API receives an override reminder withoutminutes, and rejects it.In contrast, using
popup:1mworks fine.Possible fix
Force-send
minuteswhen it is0, e.g. setForceSendFields: []string{"Minutes"}oncalendar.EventReminderwhen minutes == 0 (or always).Happy to test a patch if you’d like.
Thanks!