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

move mapToStruct to marshal package #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ElecTwix
Copy link
Contributor

@ElecTwix ElecTwix commented Nov 22, 2023

added unit tests
fix #106

Copy link
Contributor

@phughk phughk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but noting that this code is likely to change down the line as we introduce Row and Column.
Will merge after resolution

@@ -162,3 +163,77 @@ func SmartMarshal[I any](inputfunc interface{}, data I) (output interface{}, err
}
return nil, ErrNotValidFunc
}

// UnmarshalMapToStruct unmarshals a map[string]interface{} to a struct.
func UnmarshalMapToStruct(data map[string]interface{}, outStruct interface{}) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this moving, but we need to remember that this will change with the introduction of Column and Rows

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of course, but for now, we should continue to improve the project in meanwhile.

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.

Feature: Move and test unmarshalMapToStruct(data map[string]interface{}, outStruct interface{})
2 participants