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

Add websocket.CloseStatus #159

Merged
merged 2 commits into from
Oct 6, 2019
Merged

Add websocket.CloseStatus #159

merged 2 commits into from
Oct 6, 2019

Conversation

nhooyr
Copy link
Contributor

@nhooyr nhooyr commented Oct 5, 2019

Will make it much more convenient and less error prone to access
the StatusCode of a *CloseError.

Related #128

Precedent for this is in https://godoc.org/gocloud.dev/gcerrors#Code

It's annoying to do the whole xerrors.As dance when you only want to access the status code.

I was only blocked on the name for this but I think CloseStatus is nice.

@ammar @coadler

Will make it much more convenient and less error prone to access
the StatusCode of a *CloseError.
}
return -1
}

Copy link
Contributor Author

@nhooyr nhooyr Oct 5, 2019

Choose a reason for hiding this comment

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

This is the main addition in this PR, the rest is just some refactoring to allow the use of assert.Equalf in the tests for this function.

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.

1 participant