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
=== modified file 'protocol/messages.go'
--- protocol/messages.go 2014-02-24 15:55:53 +0000
+++ protocol/messages.go 2014-02-24 15:55:53 +0000
@@ -16,7 +16,7 @@
1616
17package protocol17package protocol
1818
19// Struct representing messages.19// Structs representing messages.
2020
21import (21import (
22 "encoding/json"22 "encoding/json"
2323
=== modified file 'protocol/protocol.go'
--- protocol/protocol.go 2014-02-24 15:55:53 +0000
+++ protocol/protocol.go 2014-02-24 15:55:53 +0000
@@ -64,7 +64,7 @@
64 conn: conn}64 conn: conn}
65}65}
6666
67// SetDeadline sets deadline for the subsequent WriteMessage/ReadMessage exchange.67// SetDeadline sets the deadline for the subsequent WriteMessage/ReadMessage exchange.
68func (c *protocol0) SetDeadline(t time.Time) {68func (c *protocol0) SetDeadline(t time.Time) {
69 err := c.conn.SetDeadline(t)69 err := c.conn.SetDeadline(t)
70 if err != nil {70 if err != nil {
@@ -72,8 +72,8 @@
72 }72 }
73}73}
7474
75// ReadMessage reads one message with big-endian uint16 length and JSON body75// ReadMessage reads from the connection one message with a JSON body
76// from the connection.76// preceded by its big-endian uint16 length.
77func (c *protocol0) ReadMessage(msg interface{}) error {77func (c *protocol0) ReadMessage(msg interface{}) error {
78 c.buffer.Reset()78 c.buffer.Reset()
79 _, err := io.CopyN(c.buffer, c.conn, 2)79 _, err := io.CopyN(c.buffer, c.conn, 2)
@@ -89,8 +89,8 @@
89 return json.Unmarshal(c.buffer.Bytes(), msg)89 return json.Unmarshal(c.buffer.Bytes(), msg)
90}90}
9191
92// WriteMessage writes one message with big-endian uint16 length and JSON body92// WriteMessage writes one message to the connection with a JSON body
93// to the connection.93// preceding it with its big-endian uint16 length.
94func (c *protocol0) WriteMessage(msg interface{}) error {94func (c *protocol0) WriteMessage(msg interface{}) error {
95 c.buffer.Reset()95 c.buffer.Reset()
96 c.buffer.WriteString("\x00\x00") // placeholder for length96 c.buffer.WriteString("\x00\x00") // placeholder for length
9797
=== modified file 'server/dev/server.go'
--- server/dev/server.go 2014-02-24 15:55:53 +0000
+++ server/dev/server.go 2014-02-24 15:55:53 +0000
@@ -14,7 +14,7 @@
14 with this program. If not, see <http://www.gnu.org/licenses/>.14 with this program. If not, see <http://www.gnu.org/licenses/>.
15*/15*/
1616
17// Server is a simple development server.17// Dev is a simple development server.
18package main18package main
1919
20import (20import (

Subscribers

People subscribed via source and target branches