We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current implementation of json Unmarshall requires to create a variable that will be used to unmarshall data to.
Since go has generics, we could have that step wrapped into a helper function:
func UnmarshallTo[T any](data []byte) (T, error) { var result T err := json.Unmarshal(data, &result) return result, err }
The text was updated successfully, but these errors were encountered:
I believe this should be part of the #63397 discussion
Sorry, something went wrong.
No branches or pull requests
Proposal Details
Current implementation of json Unmarshall requires to create a variable that will be used to unmarshall data to.
Since go has generics, we could have that step wrapped into a helper function:
The text was updated successfully, but these errors were encountered: