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

Fixed panic message in IgnoreUnexported #228

Merged
merged 1 commit into from
Jul 14, 2020
Merged

Conversation

ko30005
Copy link
Contributor

@ko30005 ko30005 commented Jul 14, 2020

Fixed panic message more specifically.
With this fix, you can see that IgnoreUnexported only supports a struct without the user having to look at the code.

@ko30005 ko30005 force-pushed the master branch 2 times, most recently from d3fb50f to 996994d Compare July 14, 2020 04:26
@dsnet
Copy link
Collaborator

dsnet commented Jul 14, 2020

Thanks for the PR.

For consistency, we probably want to adjust this panic message too:

t := reflect.TypeOf(typ)
if t == nil || t.Kind() != reflect.Struct {
panic(fmt.Sprintf("%T must be a struct", typ))
}

Fixed panic message more specifically.
With this fix, you can see that IgnoreUnexported only supports a struct without the user having to look at the code.
@ko30005
Copy link
Contributor Author

ko30005 commented Jul 14, 2020

Thanks!
I also fixed this panic message.

@dsnet
Copy link
Collaborator

dsnet commented Jul 14, 2020

Thanks!

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.

2 participants