bug(calendar): multi-calendar events JSON uses the key CalendarID instead of calendarId

Open Beginner friendly
#1,282 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Read internal/cmd/calendar_list.go, especially eventWithCalendar.CalendarID near line 90 and the calendarId JSON tag near line 208. Run the multi-calendar calendar events --json command using the project's relevant tests or a local Calendar API fake; done means event keys use the intended camelCase name and any compatibility choice is handled.

Written by the indexing model from the issue text.

Description

clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2

Summary

In calendar events --cal …/--calendars …/--all --json, each event has a CalendarID key. Every other key is camelCase, including calendarId in the same document's nextPageTokens.

Current (v0.47.1)

gog calendar events --cal 1 --cal 2 --json
# events[].CalendarID
# nextPageTokens[].calendarId

eventWithCalendar.CalendarID has no JSON tag (calendar_list.go#L90), so Go uses the field name; calendarEventsNextPage tags it calendarId (L208).

Suggested

Tag it json:"calendarId,omitempty". If existing consumers matter, emit both keys for a release and note the change.

Environment

gog v0.47.1 (main at 82e7fd6). Reproduced against a local fake of the Calendar API through GOG_GOOGLE_API_BASE_URL.

Dominant language
Go
Stars
8.5k
Forks
721
Avg merge
20h 41m
Merged PRs (30d)
57

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openclaw/gogcli

All issues in openclaw/gogcli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.