Skip to content

Conversation

arshukla98
Copy link

@arshukla98 arshukla98 commented Jun 7, 2025

Issue Reference

Closes: #4237

  • With pull requests:
    • Open your pull request against master
    • Your pull request should have no more than two commits, if not you should squash them.
    • It should pass all tests in the available continuous integration systems such as GitHub Actions.
    • You should add/modify tests to cover your proposed code changes.
    • If your pull request contains a new feature, please document it on the README.

Test Report

20250607_gin_tests_0790c13.pdf

Page 22 -> image

@arshukla98 arshukla98 marked this pull request as ready for review June 7, 2025 13:19
@arshukla98 arshukla98 marked this pull request as draft June 7, 2025 13:19
@arshukla98 arshukla98 marked this pull request as ready for review June 7, 2025 13:36
@arshukla98
Copy link
Author

Hi, I am ready for a PR review.

@arshukla98 arshukla98 force-pushed the Issue_4237 branch 2 times, most recently from e17500e to 0790c13 Compare June 9, 2025 06:26
@arshukla98
Copy link
Author

arshukla98 commented Jun 12, 2025

Hi, I am ready for a PR review.

@arshukla98
Copy link
Author

Hi @appleboy , I would like to make a request to trigger the github action workflow.

1 similar comment
@arshukla98
Copy link
Author

Hi @appleboy , I would like to make a request to trigger the github action workflow.

Comment on lines +187 to +195
if multi, ok := err.(interface{ Unwrap() []error }); ok {
for _, e := range multi.Unwrap() {
result = append(result, unwrapJoinErr(e)...)
}
} else if single := errors.Unwrap(err); single != nil {
result = append(result, unwrapJoinErr(single)...)
} else {
result = append(result, err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It is better to use switch syntax or a single if statement instead of ifelse.

Comment on lines +183 to +185
if err == nil {
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is prone to panic. Maybe returning an empty slice would be better

Comment on lines +170 to 178
for _, msg := range a {
for _, err := range unwrapJoinErr(msg.Err) {
fmt.Fprintf(&buffer, "Error #%02d: %s\n", count, err)
if msg.Meta != nil {
fmt.Fprintf(&buffer, " Meta: %v\n", msg.Meta)
}
count++
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The nesting of loops here seems unnecessary

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.

Unwrap joinErr in gin.Error()
2 participants