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

x/net/websocket: add runnable versions of examples mentioned in Server.Handshake documentation #32866

Open
msoedov opened this issue Jul 1, 2019 · 3 comments · May be fixed by golang/net#50
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@msoedov
Copy link
Contributor

msoedov commented Jul 1, 2019

https://godoc.org/golang.org/x/net/websocket there is missing example for redefining your own check origin callback or even disabling the existing one

@gopherbot gopherbot added this to the Unreleased milestone Jul 1, 2019
@msoedov msoedov changed the title x/net/websocket missing doc example for origin check function x/net/websocket: missing doc example for origin check function Jul 1, 2019
@bcmills bcmills changed the title x/net/websocket: missing doc example for origin check function x/net/websocket: add runnable versions of examples mentioned in (*Server).Handshake documentation Jul 1, 2019
@bcmills bcmills added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Jul 1, 2019
@bcmills bcmills changed the title x/net/websocket: add runnable versions of examples mentioned in (*Server).Handshake documentation x/net/websocket: add runnable versions of examples mentioned in Server.Handshake documentation Jul 1, 2019
@bcmills
Copy link
Contributor

bcmills commented Jul 1, 2019

Note the current comment on Server.Handshake:

// Handshake is an optional function in WebSocket handshake.
// For example, you can check, or don't check Origin header.
// Another example, you can select config.Protocol.

Since both of those examples are mentioned explicitly, they should probably be illustrated more complete in runnable (and testable!) examples.

@tomocy
Copy link
Contributor

tomocy commented Jul 9, 2019

I would like to handle it. @bcmills

@gopherbot
Copy link

Change https://golang.org/cl/190819 mentions this issue: x/net/websocket: add example of (*Server).Handshake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants