Skip to content

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

Open
0xStef wants to merge 1 commit intosteipete:mainfrom
0xStef:fix/contacts-param-types
Open

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

Conversation

@0xStef
Copy link

@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 Feb 24, 2026
0xStef added a commit to 0xStef/gogcli 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 steipete#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 Feb 24, 2026
@0xStef 0xStef force-pushed the fix/contacts-param-types branch from b28da88 to a16c335 Compare February 24, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant