Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duck typing #26

Open
adutra opened this issue Nov 18, 2022 · 0 comments
Open

Duck typing #26

adutra opened this issue Nov 18, 2022 · 0 comments
Assignees

Comments

@adutra
Copy link
Owner

adutra commented Nov 18, 2022

So far, Goalesce can only merge identical types.

We could relax that a bit and allow merging different, but similar types.

Examples of pairs that could be merged by duck typing:

  • Struct vs map[string]interface{}
  • Distinct structs with similar fields
  • Slices and arrays
  • Arrays of same element type but different lengths
  • Type aliases
  • Interface{} vs anything
@adutra adutra self-assigned this Nov 25, 2022
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

No branches or pull requests

1 participant