Merge lp:~teknico/ubuntu-push/tweak-docs into lp:ubuntu-push
- tweak-docs
- Merge into trunk
Proposed by
Nicola Larosa
Status: | Merged |
---|---|
Approved by: | Samuele Pedroni |
Approved revision: | 73 |
Merged at revision: | 73 |
Proposed branch: | lp:~teknico/ubuntu-push/tweak-docs |
Merge into: | lp:ubuntu-push |
Prerequisite: | lp:~teknico/ubuntu-push/reflow-docs |
Diff against target: |
596 lines (+91/-75) 24 files modified
README (+8/-11) bus/connectivity/connectivity.go (+3/-3) bus/connectivity/connectivity_test.go (+2/-2) bus/endpoint.go (+2/-2) bus/testing/testing_bus.go (+1/-1) client/client.go (+1/-1) client/session/levelmap/levelmap.go (+1/-1) client/session/session.go (+1/-1) config/config.go (+5/-5) logger/logger.go (+7/-7) protocol/messages.go (+4/-5) protocol/protocol.go (+6/-6) protocol/protocol_test.go (+0/-1) scripts/check_fmt (+2/-2) server/acceptance/acceptanceclient.go (+1/-0) server/acceptance/cmd/acceptanceclient.go (+1/-1) server/acceptance/config/README (+7/-6) server/dev/server.go (+1/-1) testing/condition/condition.go (+1/-1) util/redialer.go (+10/-9) whoopsie/doc.go (+18/-0) whoopsie/identifier/identifier.go (+1/-1) whoopsie/identifier/testing/testing.go (+2/-2) whoopsie/identifier/testing/testing_test.go (+6/-6) |
To merge this branch: | bzr merge lp:~teknico/ubuntu-push/tweak-docs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Samuele Pedroni | Approve | ||
Review via email: mp+207890@code.launchpad.net |
Commit message
Clean up docs and comments, and make them look better in go doc. No behavior change at all.
Description of the change
Clean up docs and comments, and make them look better in go doc. No behavior change at all.
To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README' |
2 | --- README 2014-01-14 15:35:20 +0000 |
3 | +++ README 2014-02-24 10:30:17 +0000 |
4 | @@ -1,37 +1,34 @@ |
5 | Ubuntu Push Notifications |
6 | --------------------------- |
7 | +------------------------- |
8 | |
9 | Protocol, client, and development code for Ubuntu Push Notifications. |
10 | |
11 | The code expects to be checked out as launchpad.net/ubuntu-push in a Go |
12 | -workspace, see go help gopath. |
13 | +workspace, see "go help gopath". |
14 | |
15 | -To setup go dependencies one can use: |
16 | +To setup Go dependencies, install libsqlite3-dev and run: |
17 | |
18 | make bootstrap |
19 | |
20 | -To run tests: |
21 | +To run tests, install libgcrypt11-dev and libwhoopsie-dev and run: |
22 | |
23 | make check |
24 | |
25 | -To produce coverage reports go 1.2 (default on trusty) is needed and |
26 | +To produce coverage reports you need Go 1.2 (default on Trusty) and |
27 | the cover tool (the latter can be obtained atm with something like: |
28 | -sudo GOPATH=<go-workspace> go get code.google.com/p/go.tools/cmd/cover |
29 | -) |
30 | - |
31 | +sudo GOPATH=<go-workspace> go get code.google.com/p/go.tools/cmd/cover ), |
32 | then run: |
33 | |
34 | make coverage-summary |
35 | |
36 | for a summary report, or: |
37 | |
38 | -for per package html with annotated code in coverhtml/<package-name>.html |
39 | +for per-package HTML with annotated code in coverhtml/<package-name>.html |
40 | |
41 | make coverage-html |
42 | |
43 | (it makes also textual coverhtml/<package-name>.txt reports). |
44 | |
45 | -To run the acceptance tests, go into the acceptance subdir and run: |
46 | +To run the acceptance tests, change to the acceptance subdir and run: |
47 | |
48 | ./acceptance.sh |
49 | - |
50 | |
51 | === modified file 'bus/connectivity/connectivity.go' |
52 | --- bus/connectivity/connectivity.go 2014-02-24 10:30:17 +0000 |
53 | +++ bus/connectivity/connectivity.go 2014-02-24 10:30:17 +0000 |
54 | @@ -14,8 +14,8 @@ |
55 | with this program. If not, see <http://www.gnu.org/licenses/>. |
56 | */ |
57 | |
58 | -// Package connectivity a single, simple stream of booleans |
59 | -// to answer the quesiton “are we connected?”. |
60 | +// Package connectivity implements a single, simple stream of booleans |
61 | +// to answer the question "are we connected?". |
62 | // |
63 | // It can potentially fire two falses in a row, if a disconnected |
64 | // state is followed by a dbus watch error. Other than that, it's edge |
65 | @@ -32,7 +32,7 @@ |
66 | "time" |
67 | ) |
68 | |
69 | -// the configuration for ConnectedState, with the idea that you'd populate it from a config file. |
70 | +// The configuration for ConnectedState, intended to be populated from a config file. |
71 | type ConnectivityConfig struct { |
72 | // how long to wait after a state change to make sure it's "stable" |
73 | // before acting on it |
74 | |
75 | === modified file 'bus/connectivity/connectivity_test.go' |
76 | --- bus/connectivity/connectivity_test.go 2014-02-05 18:17:26 +0000 |
77 | +++ bus/connectivity/connectivity_test.go 2014-02-24 10:30:17 +0000 |
78 | @@ -74,7 +74,7 @@ |
79 | c.Check(cs.connAttempts, Equals, uint32(3)) // 1 more than the Fail2Work |
80 | } |
81 | |
82 | -// when the calls to NetworkManager fail for a bit, we're still OK |
83 | +// when the calls to NetworkManager fails for a bit, we're still OK |
84 | func (s *ConnSuite) TestStartRetriesCall(c *C) { |
85 | endp := testingbus.NewTestingEndpoint(condition.Work(true), condition.Fail2Work(5), uint32(networkmanager.Connecting)) |
86 | cs := connectedState{config: ConnectivityConfig{}, log: s.log, endp: endp} |
87 | @@ -84,7 +84,7 @@ |
88 | c.Check(cs.connAttempts, Equals, uint32(6)) |
89 | } |
90 | |
91 | -// when ... and bear with me ... the bus works, and the first call to |
92 | +// when... and bear with me... the bus works, and the first call to |
93 | // get network manager's state works, but then you can't establish the |
94 | // watch, we recover and try again. |
95 | func (s *ConnSuite) TestStartRetriesWatch(c *C) { |
96 | |
97 | === modified file 'bus/endpoint.go' |
98 | --- bus/endpoint.go 2014-02-06 07:59:27 +0000 |
99 | +++ bus/endpoint.go 2014-02-24 10:30:17 +0000 |
100 | @@ -101,9 +101,9 @@ |
101 | return nil |
102 | } |
103 | |
104 | -// WatchSignal() takes a member name and sets up a watch for it (on the name, |
105 | +// WatchSignal() takes a member name, sets up a watch for it (on the name, |
106 | // path and interface provided when creating the endpoint), and then calls f() |
107 | -// with the unpacked value. If it's unable to set up the watch it'll return an |
108 | +// with the unpacked value. If it's unable to set up the watch it returns an |
109 | // error. If the watch fails once established, d() is called. Typically f() |
110 | // sends the values over a channel, and d() would close the channel. |
111 | func (endp *endpoint) WatchSignal(member string, f func(...interface{}), d func()) error { |
112 | |
113 | === modified file 'bus/testing/testing_bus.go' |
114 | --- bus/testing/testing_bus.go 2014-01-23 14:33:08 +0000 |
115 | +++ bus/testing/testing_bus.go 2014-02-24 10:30:17 +0000 |
116 | @@ -14,7 +14,7 @@ |
117 | with this program. If not, see <http://www.gnu.org/licenses/>. |
118 | */ |
119 | |
120 | -// Package bus/testing provides an implementation of bus.Bus and bus.Endpoint |
121 | +// Package testing provides an implementation of bus.Bus and bus.Endpoint |
122 | // suitable for testing. |
123 | package testing |
124 | |
125 | |
126 | === modified file 'client/client.go' |
127 | --- client/client.go 2014-02-08 18:26:49 +0000 |
128 | +++ client/client.go 2014-02-24 10:30:17 +0000 |
129 | @@ -14,7 +14,7 @@ |
130 | with this program. If not, see <http://www.gnu.org/licenses/>. |
131 | */ |
132 | |
133 | -// The client package implements the Ubuntu Push Notifications client-side |
134 | +// Package client implements the Ubuntu Push Notifications client-side |
135 | // daemon. |
136 | package client |
137 | |
138 | |
139 | === modified file 'client/session/levelmap/levelmap.go' |
140 | --- client/session/levelmap/levelmap.go 2014-02-12 13:52:19 +0000 |
141 | +++ client/session/levelmap/levelmap.go 2014-02-24 10:30:17 +0000 |
142 | @@ -14,7 +14,7 @@ |
143 | with this program. If not, see <http://www.gnu.org/licenses/>. |
144 | */ |
145 | |
146 | -// levelmap holds implementations of the LevelMap that the client |
147 | +// Package levelmap holds implementations of the LevelMap that the client |
148 | // session uses to keep track of what messages it has seen. |
149 | package levelmap |
150 | |
151 | |
152 | === modified file 'client/session/session.go' |
153 | --- client/session/session.go 2014-02-12 16:56:18 +0000 |
154 | +++ client/session/session.go 2014-02-24 10:30:17 +0000 |
155 | @@ -14,7 +14,7 @@ |
156 | with this program. If not, see <http://www.gnu.org/licenses/>. |
157 | */ |
158 | |
159 | -// The client/session package handles the minutiae of interacting with |
160 | +// Package session handles the minutiae of interacting with |
161 | // the Ubuntu Push Notifications server. |
162 | package session |
163 | |
164 | |
165 | === modified file 'config/config.go' |
166 | --- config/config.go 2014-01-21 21:35:21 +0000 |
167 | +++ config/config.go 2014-02-24 10:30:17 +0000 |
168 | @@ -95,10 +95,10 @@ |
169 | } |
170 | |
171 | // ReadConfig reads a JSON configuration into destConfig which should |
172 | -// be a pointer to a structure, it does some more configuration |
173 | -// specific error checking than plain JSON decoding and mentions |
174 | -// fields in errors . Configuration fields are expected to start with |
175 | -// lower case in the JSON object. |
176 | +// be a pointer to a structure. It does some more configuration |
177 | +// specific error checking than plain JSON decoding, and mentions |
178 | +// fields in errors. Configuration fields in the JSON object are |
179 | +// expected to start with lower case. |
180 | func ReadConfig(r io.Reader, destConfig interface{}) error { |
181 | destValue, err := checkDestConfig(destConfig) |
182 | if err != nil { |
183 | @@ -182,7 +182,7 @@ |
184 | return uint(cqs) |
185 | } |
186 | |
187 | -// LoadFile reads a file possibly relative to a base dir. |
188 | +// LoadFile reads a file possibly relative to a base dir. |
189 | func LoadFile(p, baseDir string) ([]byte, error) { |
190 | if p == "" { |
191 | return nil, nil |
192 | |
193 | === modified file 'logger/logger.go' |
194 | --- logger/logger.go 2014-02-06 11:23:36 +0000 |
195 | +++ logger/logger.go 2014-02-24 10:30:17 +0000 |
196 | @@ -27,16 +27,16 @@ |
197 | |
198 | // Logger is a simple logger interface with logging at levels. |
199 | type Logger interface { |
200 | - // (Re)xpose base Output for logging events. |
201 | + // Re-expose base Output for logging events. |
202 | Output(calldept int, s string) error |
203 | // Errorf logs an error. |
204 | Errorf(format string, v ...interface{}) |
205 | - // Fatalf logs an error and exists the program with os.Exit(1). |
206 | + // Fatalf logs an error and exits the program with os.Exit(1). |
207 | Fatalf(format string, v ...interface{}) |
208 | - // PanicStackf logs a error message and a stacktrace, for use |
209 | + // PanicStackf logs an error message and a stacktrace, for use |
210 | // in panic recovery. |
211 | PanicStackf(format string, v ...interface{}) |
212 | - // Infof logs a info message. |
213 | + // Infof logs an info message. |
214 | Infof(format string, v ...interface{}) |
215 | // Debugf logs a debug message. |
216 | Debugf(format string, v ...interface{}) |
217 | @@ -59,13 +59,13 @@ |
218 | "debug": lDebug, |
219 | } |
220 | |
221 | -// MinimalLogger is the minimal interface required to build a simple logger on top. |
222 | +// MinimalLogger is the minimal interface required to build a simple logger. |
223 | type MinimalLogger interface { |
224 | Output(calldepth int, s string) error |
225 | } |
226 | |
227 | // NewSimpleLoggerFromMinimalLogger creates a logger logging only up |
228 | -// to the given level. level can be in order: "error", "info", |
229 | +// to the given level. The level can be, in order: "error", "info", |
230 | // "debug". It takes a value just implementing stlib Logger.Output(). |
231 | func NewSimpleLoggerFromMinimalLogger(minLog MinimalLogger, level string) Logger { |
232 | nlevel := levelToNLevel[level] |
233 | @@ -76,7 +76,7 @@ |
234 | } |
235 | |
236 | // NewSimpleLogger creates a logger logging only up to the given |
237 | -// level. level can be in order: "error", "info", "debug". It takes a |
238 | +// level. The level can be, in order: "error", "info", "debug". It takes an |
239 | // io.Writer. |
240 | func NewSimpleLogger(w io.Writer, level string) Logger { |
241 | return NewSimpleLoggerFromMinimalLogger( |
242 | |
243 | === modified file 'protocol/messages.go' |
244 | --- protocol/messages.go 2014-01-15 15:54:20 +0000 |
245 | +++ protocol/messages.go 2014-02-24 10:30:17 +0000 |
246 | @@ -16,14 +16,13 @@ |
247 | |
248 | package protocol |
249 | |
250 | -// representative struct for messages |
251 | +// Struct representing messages. |
252 | |
253 | import ( |
254 | "encoding/json" |
255 | - // "log" |
256 | ) |
257 | |
258 | -// System channel id using a shortened hex encoded form for the NIL UUID |
259 | +// System channel id using a shortened hex-encoded form for the NIL UUID. |
260 | const SystemChannelId = "0" |
261 | |
262 | // CONNECT message |
263 | @@ -43,7 +42,7 @@ |
264 | } |
265 | |
266 | // ConnAckParams carries the connection parameters from the server on |
267 | -// connection acknowledment. |
268 | +// connection acknowledgement. |
269 | type ConnAckParams struct { |
270 | // ping interval formatted time.Duration |
271 | PingInterval string |
272 | @@ -108,7 +107,7 @@ |
273 | Payload json.RawMessage `json:"P"` |
274 | } |
275 | |
276 | -// ACKnowelgement message |
277 | +// ACKnowledgement message |
278 | type AckMsg struct { |
279 | Type string `json:"T"` |
280 | } |
281 | |
282 | === modified file 'protocol/protocol.go' |
283 | --- protocol/protocol.go 2014-02-24 10:30:17 +0000 |
284 | +++ protocol/protocol.go 2014-02-24 10:30:17 +0000 |
285 | @@ -14,7 +14,7 @@ |
286 | with this program. If not, see <http://www.gnu.org/licenses/>. |
287 | */ |
288 | |
289 | -// Package protocol has code to talk the client-daemon<->push-server protocol. |
290 | +// Package protocol implements the client-daemon <-> push-server protocol. |
291 | package protocol |
292 | |
293 | import ( |
294 | @@ -64,7 +64,7 @@ |
295 | conn: conn} |
296 | } |
297 | |
298 | -// SetDeadline sets deadline for the subsquent WriteMessage/ReadMessage exchange |
299 | +// SetDeadline sets deadline for the subsequent WriteMessage/ReadMessage exchange. |
300 | func (c *protocol0) SetDeadline(t time.Time) { |
301 | err := c.conn.SetDeadline(t) |
302 | if err != nil { |
303 | @@ -72,8 +72,8 @@ |
304 | } |
305 | } |
306 | |
307 | -// ReadMessage reads one message made of big endian uint16 length, JSON body |
308 | -// of length from the connection. |
309 | +// ReadMessage reads one message with big-endian uint16 length and JSON body |
310 | +// from the connection. |
311 | func (c *protocol0) ReadMessage(msg interface{}) error { |
312 | c.buffer.Reset() |
313 | _, err := io.CopyN(c.buffer, c.conn, 2) |
314 | @@ -89,8 +89,8 @@ |
315 | return json.Unmarshal(c.buffer.Bytes(), msg) |
316 | } |
317 | |
318 | -// WriteMessage writes one message made of big endian uint16 length, JSON body |
319 | -// of length to the connection. |
320 | +// WriteMessage writes one message with big-endian uint16 length and JSON body |
321 | +// to the connection. |
322 | func (c *protocol0) WriteMessage(msg interface{}) error { |
323 | c.buffer.Reset() |
324 | c.buffer.WriteString("\x00\x00") // placeholder for length |
325 | |
326 | === modified file 'protocol/protocol_test.go' |
327 | --- protocol/protocol_test.go 2014-02-10 22:53:00 +0000 |
328 | +++ protocol/protocol_test.go 2014-02-24 10:30:17 +0000 |
329 | @@ -19,7 +19,6 @@ |
330 | import ( |
331 | "encoding/binary" |
332 | "encoding/json" |
333 | - // "fmt" |
334 | "io" |
335 | "net" |
336 | "testing" |
337 | |
338 | === modified file 'scripts/check_fmt' |
339 | --- scripts/check_fmt 2014-01-14 15:35:20 +0000 |
340 | +++ scripts/check_fmt 2014-02-24 10:30:17 +0000 |
341 | @@ -1,6 +1,6 @@ |
342 | #!/bin/bash |
343 | -# check that all go files respect gofmt formatting |
344 | -# assumes GOPATH is properly set |
345 | +# Checks that all Go files in the specified project respect gofmt formatting. |
346 | +# Requires GOPATH to be set to a single path, not a list of them. |
347 | PROJECT=${1:?missing project} |
348 | PROBLEMS= |
349 | for pkg in $(go list ${PROJECT}/...) ; do |
350 | |
351 | === modified file 'server/acceptance/acceptanceclient.go' |
352 | --- server/acceptance/acceptanceclient.go 2014-02-10 23:19:08 +0000 |
353 | +++ server/acceptance/acceptanceclient.go 2014-02-24 10:30:17 +0000 |
354 | @@ -14,6 +14,7 @@ |
355 | with this program. If not, see <http://www.gnu.org/licenses/>. |
356 | */ |
357 | |
358 | +// Package acceptance contains the acceptance client. |
359 | package acceptance |
360 | |
361 | import ( |
362 | |
363 | === modified file 'server/acceptance/cmd/acceptanceclient.go' |
364 | --- server/acceptance/cmd/acceptanceclient.go 2014-02-10 23:19:08 +0000 |
365 | +++ server/acceptance/cmd/acceptanceclient.go 2014-02-24 10:30:17 +0000 |
366 | @@ -14,7 +14,7 @@ |
367 | with this program. If not, see <http://www.gnu.org/licenses/>. |
368 | */ |
369 | |
370 | -// acceptanceclient for playing |
371 | +// acceptanceclient command for playing. |
372 | package main |
373 | |
374 | import ( |
375 | |
376 | === modified file 'server/acceptance/config/README' |
377 | --- server/acceptance/config/README 2014-01-14 15:35:20 +0000 |
378 | +++ server/acceptance/config/README 2014-02-24 10:30:17 +0000 |
379 | @@ -1,7 +1,8 @@ |
380 | testing.key/testing.cert |
381 | -------------------------- |
382 | -generated with: |
383 | - |
384 | -go run /usr/lib/go/src/pkg/crypto/tls/generate_cert.go -ca -host localhost -rsa-bits 512 -duration 87600h |
385 | - |
386 | -and then renamed |
387 | +------------------------ |
388 | + |
389 | +Generated with: |
390 | + |
391 | + go run /usr/lib/go/src/pkg/crypto/tls/generate_cert.go -ca -host localhost -rsa-bits 512 -duration 87600h |
392 | + |
393 | +and then renamed. |
394 | |
395 | === modified file 'server/dev/server.go' |
396 | --- server/dev/server.go 2014-02-18 14:19:05 +0000 |
397 | +++ server/dev/server.go 2014-02-24 10:30:17 +0000 |
398 | @@ -14,7 +14,7 @@ |
399 | with this program. If not, see <http://www.gnu.org/licenses/>. |
400 | */ |
401 | |
402 | -// simple development server. |
403 | +// Server is a simple development server. |
404 | package main |
405 | |
406 | import ( |
407 | |
408 | === modified file 'testing/condition/condition.go' |
409 | --- testing/condition/condition.go 2014-02-01 20:57:27 +0000 |
410 | +++ testing/condition/condition.go 2014-02-24 10:30:17 +0000 |
411 | @@ -14,7 +14,7 @@ |
412 | with this program. If not, see <http://www.gnu.org/licenses/>. |
413 | */ |
414 | |
415 | -// Package testing/condition implements a strategy family for use in testing. |
416 | +// Package condition implements a strategy family for use in testing. |
417 | package condition |
418 | |
419 | import ( |
420 | |
421 | === modified file 'util/redialer.go' |
422 | --- util/redialer.go 2014-02-05 12:55:49 +0000 |
423 | +++ util/redialer.go 2014-02-24 10:30:17 +0000 |
424 | @@ -14,6 +14,7 @@ |
425 | with this program. If not, see <http://www.gnu.org/licenses/>. |
426 | */ |
427 | |
428 | +// Package util contains the redialer. |
429 | package util |
430 | |
431 | import ( |
432 | @@ -22,7 +23,7 @@ |
433 | ) |
434 | |
435 | // A Dialer is an object that knows how to establish a connection, and |
436 | -// where you'd usually want some kind of back off if that connection |
437 | +// where you'd usually want some kind of backoff if that connection |
438 | // fails. |
439 | type Dialer interface { |
440 | Dial() error |
441 | @@ -39,16 +40,16 @@ |
442 | var timeouts []time.Duration |
443 | var trwlock sync.RWMutex |
444 | |
445 | -// retrieve the list of timeouts used for exponential backoff |
446 | +// Retrieve the list of timeouts used for exponential backoff. |
447 | func Timeouts() []time.Duration { |
448 | trwlock.RLock() |
449 | defer trwlock.RUnlock() |
450 | return timeouts |
451 | } |
452 | |
453 | -// for testing: change the default timeouts for the provided ones, |
454 | +// For testing: change the default timeouts with the provided ones, |
455 | // returning the defaults (the idea being you reset them on test |
456 | -// teardown) |
457 | +// teardown). |
458 | func SwapTimeouts(newTimeouts []time.Duration) (oldTimeouts []time.Duration) { |
459 | trwlock.Lock() |
460 | defer trwlock.Unlock() |
461 | @@ -57,8 +58,8 @@ |
462 | } |
463 | |
464 | // An AutoRedialer's Redial() method retries its dialer's Dial() method until |
465 | -// it stops returning an error. It does exponential (optionally jitter'ed) |
466 | -// backoff. |
467 | +// it stops returning an error. It does exponential backoff (optionally |
468 | +// jittered). |
469 | type AutoRedialer interface { |
470 | Redial() uint32 // Redial keeps on calling Dial until it stops returning an error. |
471 | Stop() // Stop shuts down the given AutoRedialer, if it is still retrying. |
472 | @@ -89,10 +90,10 @@ |
473 | } |
474 | |
475 | // Redial keeps on calling Dial until it stops returning an error. It does |
476 | -// exponential backoff, adding the output of Jitter at each step back. |
477 | +// exponential backoff, adding back the output of Jitter at each step. |
478 | func (ar *autoRedialer) Redial() uint32 { |
479 | if ar == nil { |
480 | - // at least it's better than the segfault... |
481 | + // at least it's better than a segfault... |
482 | panic("you can't Redial a nil AutoRedialer") |
483 | } |
484 | if ar.stop == nil { |
485 | @@ -129,7 +130,7 @@ |
486 | } |
487 | } |
488 | |
489 | -// returns a stoppable AutoRedialer using the provided Dialer. If the Dialer |
490 | +// Returns a stoppable AutoRedialer using the provided Dialer. If the Dialer |
491 | // is also a Jitterer, the backoff will be jittered. |
492 | func NewAutoRedialer(dialer Dialer) AutoRedialer { |
493 | ar := &autoRedialer{stop: make(chan bool), dial: dialer.Dial} |
494 | |
495 | === added file 'whoopsie/doc.go' |
496 | --- whoopsie/doc.go 1970-01-01 00:00:00 +0000 |
497 | +++ whoopsie/doc.go 2014-02-24 10:30:17 +0000 |
498 | @@ -0,0 +1,18 @@ |
499 | +/* |
500 | + Copyright 2013-2014 Canonical Ltd. |
501 | + |
502 | + This program is free software: you can redistribute it and/or modify it |
503 | + under the terms of the GNU General Public License version 3, as published |
504 | + by the Free Software Foundation. |
505 | + |
506 | + This program is distributed in the hope that it will be useful, but |
507 | + WITHOUT ANY WARRANTY; without even the implied warranties of |
508 | + MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
509 | + PURPOSE. See the GNU General Public License for more details. |
510 | + |
511 | + You should have received a copy of the GNU General Public License along |
512 | + with this program. If not, see <http://www.gnu.org/licenses/>. |
513 | +*/ |
514 | + |
515 | +// Package whoopsie wraps libwhoopsie. |
516 | +package whoopsie |
517 | |
518 | === modified file 'whoopsie/identifier/identifier.go' |
519 | --- whoopsie/identifier/identifier.go 2014-02-03 12:23:56 +0000 |
520 | +++ whoopsie/identifier/identifier.go 2014-02-24 10:30:17 +0000 |
521 | @@ -14,7 +14,7 @@ |
522 | with this program. If not, see <http://www.gnu.org/licenses/>. |
523 | */ |
524 | |
525 | -// Package whoopsie/identifier wraps libwhoopsie, and is thus the |
526 | +// Package identifier wraps libwhoopsie, and is thus the |
527 | // source of an anonymous and stable system id used by the Ubuntu |
528 | // error tracker and the Ubuntu push notifications service. |
529 | package identifier |
530 | |
531 | === modified file 'whoopsie/identifier/testing/testing.go' |
532 | --- whoopsie/identifier/testing/testing.go 2014-01-15 15:51:50 +0000 |
533 | +++ whoopsie/identifier/testing/testing.go 2014-02-24 10:30:17 +0000 |
534 | @@ -14,8 +14,8 @@ |
535 | with this program. If not, see <http://www.gnu.org/licenses/>. |
536 | */ |
537 | |
538 | -// Package whoopsie/identifier/testing implements a couple of Ids that |
539 | -// are useful for testing things that use whoopsie/identifier. |
540 | +// Package testing implements a couple of Ids that are useful |
541 | +// for testing things that use whoopsie/identifier. |
542 | package testing |
543 | |
544 | import "errors" |
545 | |
546 | === modified file 'whoopsie/identifier/testing/testing_test.go' |
547 | --- whoopsie/identifier/testing/testing_test.go 2014-01-15 15:51:50 +0000 |
548 | +++ whoopsie/identifier/testing/testing_test.go 2014-02-24 10:30:17 +0000 |
549 | @@ -29,41 +29,41 @@ |
550 | |
551 | var _ = Suite(&IdentifierSuite{}) |
552 | |
553 | -// TestSettableDefaultValueVisible tests SettableIdentifier's default |
554 | +// TestSettableDefaultValueVisible tests that SettableIdentifier's default |
555 | // value is notable. |
556 | func (s *IdentifierSuite) TestSettableDefaultValueVisible(c *C) { |
557 | id := Settable() |
558 | c.Check(id.String(), Equals, "<Settable>") |
559 | } |
560 | |
561 | -// TestSettableSets tests SettableIdentifier is settable. |
562 | +// TestSettableSets tests that SettableIdentifier is settable. |
563 | func (s *IdentifierSuite) TestSettableSets(c *C) { |
564 | id := Settable() |
565 | id.Set("hello") |
566 | c.Check(id.String(), Equals, "hello") |
567 | } |
568 | |
569 | -// TestSettableGenerateDoesNotFail tests SettableIdentifier's Generate |
570 | +// TestSettableGenerateDoesNotFail tests that SettableIdentifier's Generate |
571 | // does not fail. |
572 | func (s *IdentifierSuite) TestSettableGenerateDoesNotFail(c *C) { |
573 | id := Settable() |
574 | c.Check(id.Generate(), Equals, nil) |
575 | } |
576 | |
577 | -// TestFailingFails tests FailingIdentifier fails. |
578 | +// TestFailingFails tests that FailingIdentifier fails. |
579 | func (s *IdentifierSuite) TestFailingFails(c *C) { |
580 | id := Failing() |
581 | c.Check(id.Generate(), Not(Equals), nil) |
582 | } |
583 | |
584 | -// TestFailingStringNotEmpty tests FailingIdentifier still has a |
585 | +// TestFailingStringNotEmpty tests that FailingIdentifier still has a |
586 | // non-empty string. |
587 | func (s *IdentifierSuite) TestFailingStringNotEmpty(c *C) { |
588 | id := Failing() |
589 | c.Check(id.String(), Equals, "<Failing>") |
590 | } |
591 | |
592 | -// TestIdentifierInterface tests FailingIdentifier and |
593 | +// TestIdentifierInterface tests that FailingIdentifier and |
594 | // SettableIdentifier implement Id. |
595 | func (s *IdentifierSuite) TestIdentifierInterface(c *C) { |
596 | _ = []identifier.Id{Failing(), Settable()} |