Skip to content

fix(contacts): correct parameter type grouping in helper functions#333

Closed
0xStef wants to merge 1 commit intoopenclaw:mainfrom
0xStef:fix/contacts-param-types
Closed

fix(contacts): correct parameter type grouping in helper functions#333
0xStef wants to merge 1 commit intoopenclaw:mainfrom
0xStef:fix/contacts-param-types

Conversation

@0xStef
Copy link
Copy Markdown

@0xStef 0xStef commented Feb 20, 2026

Summary

  • Fix compilation error in contactsApplyPersonName and contactsApplyPersonOrganization introduced in 957603e
  • In Go, parameters sharing a type group (e.g., `given, familySet bool`) inherit the final type — this caused `given` and `org` (which should be `string`) to be typed as `bool`
  • Corrects both function signatures so each parameter has an explicit type

Test plan

  • `go build ./...` passes (was previously failing with type mismatch errors)
  • Existing contacts tests pass

`contactsApplyPersonName` and `contactsApplyPersonOrganization` had
incorrect Go parameter type grouping where string parameters (`given`,
`org`) were implicitly typed as `bool` due to sharing a type group with
the preceding bool parameter.

This caused a compilation error:
  cannot use given (variable of type bool) as string value in argument
  to strings.TrimSpace

Introduced in 957603e.
@0xStef 0xStef changed the title fix(contacts): correct parameter type grouping in helper functions feat(gmail): add snooze command group with label simulation Feb 24, 2026
0xStef added a commit to 0xStef/google-cli that referenced this pull request Feb 24, 2026
Upstream steipete/gogcli:main has a compilation error introduced in
957603e where string parameters (given, org) were implicitly typed as
bool due to Go parameter group sharing. Apply the same fix from PR openclaw#333
so this branch compiles standalone without depending on that PR landing.
@0xStef 0xStef changed the title feat(gmail): add snooze command group with label simulation fix(contacts): correct parameter type grouping in helper functions Feb 24, 2026
@0xStef 0xStef force-pushed the fix/contacts-param-types branch from b28da88 to a16c335 Compare February 24, 2026 17:27
@steipete
Copy link
Copy Markdown
Collaborator

steipete commented Mar 7, 2026

Closing as duplicate of #355, which covers the same contacts_crud build fix with current tests.

@steipete steipete closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants