Skip to content

Commit ce5a002

Browse files
committed
Rename example directory to chat-example
1 parent f8afe03 commit ce5a002

File tree

10 files changed

+5
-5
lines changed

10 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ go get nhooyr.io/websocket
3434

3535
For a production quality example that demonstrates the complete API, see the [echo example](https://godoc.org/nhooyr.io/websocket#example-package--Echo).
3636

37-
For a full stack example, see the [./example](./example) subdirectory which contains a chat example with a browser client.
37+
For a full stack example, see [./chat-example](./chat-example).
3838

3939
### Server
4040

example/README.md renamed to chat-example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This directory contains a full stack example of a simple chat webapp using nhooyr.io/websocket.
44

55
```bash
6-
$ cd example
6+
$ cd chat-example
77
$ go run . localhost:0
88
listening on http://127.0.0.1:51055
99
```

example/chat.go renamed to chat-example/chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (cs *chatServer) subscribeHandler(w http.ResponseWriter, r *http.Request) {
3333
return
3434
}
3535
if websocket.CloseStatus(err) == websocket.StatusNormalClosure ||
36-
websocket.CloseStatus(err) == websocket.StatusGoingAway {
36+
websocket.CloseStatus(err) == websocket.StatusGoingAway {
3737
return
3838
}
3939
if err != nil {
File renamed without changes.
File renamed without changes.
File renamed without changes.

example/index.html renamed to chat-example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div id="publish-form-container">
1717
<form id="publish-form">
1818
<input name="message" id="message-input" type="text" />
19-
<input type="submit" />
19+
<input value="Submit" type="submit"/>
2020
</form>
2121
</div>
2222
</div>
File renamed without changes.
File renamed without changes.

conn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ func newConnTest(t testing.TB, dialOpts *websocket.DialOptions, acceptOpts *webs
329329
}
330330
t.Helper()
331331

332-
ctx, cancel := context.WithTimeout(context.Background(), time.Second * 30)
332+
ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
333333
tt = &connTest{t: t, ctx: ctx}
334334
tt.appendDone(cancel)
335335

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy