Comments (7)
If you follow the link comment you'll see the example.
If not please let me know. Worked for me just tried it.
from websocket.
I code Go both professionally and personally, and this is the first time I have ever seen an example like this:
package main
import ()
func main() {
// https://github.com/nhooyr/websocket/tree/master/internal/examples/echo
}
why not just code the examples inline, like the rest:
https://godocs.io/nhooyr.io/websocket#example-package-CrossOrigin
from websocket.
It's a multi file example with tests. Such examples cannot be effectively included inline with godoc. At least not to my knowledge.
from websocket.
Perhaps it would be worth having the echo.go file inline though and also link to the full runnable example.
from websocket.
I mean if you are getting to the point where you examples are multiple files, it might be better to just link to the GitHub folder where the example are. but just do a normal link to the folder, putting a link inside a Go program just seems wrong.
from websocket.
I mean if you are getting to the point where you examples are multiple files, it might be better to just link to the GitHub folder where the example are. but just do a normal link to the folder, putting a link inside a Go program just seems wrong.
Problem is such links are not easily identifiable unless you read the full godoc which many people do not do. This way, it's easily identifiable as part of the godoc UI.
from websocket.
OK, well put the link/links the VERY top of the doc, that way its unlikely to be missed
from websocket.
Related Issues (20)
- websocket.Conn.CloseNow() panics in WaitGroup.Wait HOT 2
- failed to get reader: use of closed network connection HOT 3
- Add custom ping message option to Ping function HOT 1
- failed to WebSocket dial: response body is not a io.ReadWriteCloser: io.nopCloserWriterTo HOT 1
- unsupported permessage-deflate parameter: "client_max_window_bits=15" from client HOT 8
- Update docs and mention explicit close required change in v1.8.11 HOT 16
- panic: sync: WaitGroup is reused before previous Wait has returned HOT 1
- Return net.ErrClosed from Read methods when connection is closed by us HOT 6
- failed: Close received after close HOT 6
- Document wsjson.Read closes the connection with the appropriate close status and error message if bad JSON is read
- Should use path.Match instead of filepath.Match HOT 4
- Compatibility issues HOT 14
- Improve control on close reason
- Support (*http.ResponseController).Hijack() HOT 1
- Use existing JS Websocket
- Setting authorization headers on handshake request HOT 1
- 1008 unexpected data message: When using htmx client
- WebSocket Dial Handshake 403 When Connecting to Server Written Using x/net/websocket HOT 3
- Upgrading broken due to vanity rename HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocket.