Skip to content

Commit bba8dd3

Browse files
Trotttargos
authored andcommittedApr 22, 2020
doc: simplify and correct example descriptions in net.md
Instead of indicating that examples show lines to change in previous examples, present the examples as standalone items. They suffice on their own. In the first of these, it says to change "the second line" of a previous example, but if it were literally changed to the provided line, it would result in a syntax error. In the second of these, it gives the wrong line to change. All of this is unnecessary and probably makes the examples harder to follow. So simplify and treat each one as a separate example. PR-URL: #32451 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4b5fd24 commit bba8dd3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎doc/api/net.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,7 @@ client.on('end', () => {
10641064
});
10651065
```
10661066

1067-
To connect on the socket `/tmp/echo.sock` the second line would just be
1068-
changed to:
1067+
To connect on the socket `/tmp/echo.sock`:
10691068

10701069
```js
10711070
const client = net.createConnection({ path: '/tmp/echo.sock' });
@@ -1174,8 +1173,7 @@ Test this by using `telnet`:
11741173
$ telnet localhost 8124
11751174
```
11761175

1177-
To listen on the socket `/tmp/echo.sock` the third line from the last would
1178-
just be changed to:
1176+
To listen on the socket `/tmp/echo.sock`:
11791177

11801178
```js
11811179
server.listen('/tmp/echo.sock', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.