Merge lp:~pedronis/ubuntu-push/tweak-docs into lp:ubuntu-push

Proposed by Samuele Pedroni
Status: Merged
Approved by: Samuele Pedroni
Approved revision: 74
Merged at revision: 74
Proposed branch: lp:~pedronis/ubuntu-push/tweak-docs
Merge into: lp:ubuntu-push
Prerequisite: lp:~teknico/ubuntu-push/tweak-docs
Diff against target: 60 lines (+7/-7)
3 files modified
protocol/messages.go (+1/-1)
protocol/protocol.go (+5/-5)
server/dev/server.go (+1/-1)
To merge this branch: bzr merge lp:~pedronis/ubuntu-push/tweak-docs
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+207959@code.launchpad.net

Commit message

further small doc cleanups

Description of the change

further doc tweaks on top of teknico's

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'protocol/messages.go'
2--- protocol/messages.go 2014-02-24 15:55:53 +0000
3+++ protocol/messages.go 2014-02-24 15:55:53 +0000
4@@ -16,7 +16,7 @@
5
6 package protocol
7
8-// Struct representing messages.
9+// Structs representing messages.
10
11 import (
12 "encoding/json"
13
14=== modified file 'protocol/protocol.go'
15--- protocol/protocol.go 2014-02-24 15:55:53 +0000
16+++ protocol/protocol.go 2014-02-24 15:55:53 +0000
17@@ -64,7 +64,7 @@
18 conn: conn}
19 }
20
21-// SetDeadline sets deadline for the subsequent WriteMessage/ReadMessage exchange.
22+// SetDeadline sets the deadline for the subsequent WriteMessage/ReadMessage exchange.
23 func (c *protocol0) SetDeadline(t time.Time) {
24 err := c.conn.SetDeadline(t)
25 if err != nil {
26@@ -72,8 +72,8 @@
27 }
28 }
29
30-// ReadMessage reads one message with big-endian uint16 length and JSON body
31-// from the connection.
32+// ReadMessage reads from the connection one message with a JSON body
33+// preceded by its big-endian uint16 length.
34 func (c *protocol0) ReadMessage(msg interface{}) error {
35 c.buffer.Reset()
36 _, err := io.CopyN(c.buffer, c.conn, 2)
37@@ -89,8 +89,8 @@
38 return json.Unmarshal(c.buffer.Bytes(), msg)
39 }
40
41-// WriteMessage writes one message with big-endian uint16 length and JSON body
42-// to the connection.
43+// WriteMessage writes one message to the connection with a JSON body
44+// preceding it with its big-endian uint16 length.
45 func (c *protocol0) WriteMessage(msg interface{}) error {
46 c.buffer.Reset()
47 c.buffer.WriteString("\x00\x00") // placeholder for length
48
49=== modified file 'server/dev/server.go'
50--- server/dev/server.go 2014-02-24 15:55:53 +0000
51+++ server/dev/server.go 2014-02-24 15:55:53 +0000
52@@ -14,7 +14,7 @@
53 with this program. If not, see <http://www.gnu.org/licenses/>.
54 */
55
56-// Server is a simple development server.
57+// Dev is a simple development server.
58 package main
59
60 import (

Subscribers

People subscribed via source and target branches