Commit Graph

13 Commits

Author SHA1 Message Date
Simon Alling
bd2c06f28f Clarify forever channel declarations
The current idiom

    forever := make(chan bool)

gives the impression that booleans will be sent through `forever`.  But
the channel never has anything sent through it; its purpose is just to
block indefinitely.

Go doesn't have any bottom type (empty type; ⊥), but it does have a unit
type, namely `struct{}`.  Because not even such values will be sent, the
channel need not even exist at all, leaving no doubts as to its purpose.
2022-03-09 16:12:15 +01:00
Ignacio Taranto
98a3ff7c1f Go: Use log.Panicf instead log.Fatalf
The problem is that log.Fatalf calls os.Exit(1) behind the covers and
defer statements won't be called.
2021-11-18 16:09:36 -03:00
Michael Klishin
52ca462906
Go: switch to rabbitmq/amqp091-go 2021-06-09 14:58:58 +03:00
Lewis Llobera
cf5263e379 Correct Go variable casing 2021-02-03 16:54:18 +01:00
Larry Qu
92bcb23944 Update worker.go
fix: Ack should be an the end of loop.
2017-04-10 22:41:44 +08:00
Hiroaki Nakamura
b877dbd708 Remove reduncant panic after log.Fatalf
Also run gofmt to format code
2016-07-01 00:15:03 +00:00
Giuseppe Privitera
8fdbdae4e7 set prefetch count to 1 2015-08-12 09:32:02 +01:00
Giuseppe Privitera
a2fdf79d5b added feedback after n secs sleep 2015-08-10 17:46:35 +01:00
mandolyte
c51568aad5 Imports corrected 2014-10-26 18:08:57 -04:00
mandolyte
1720d85d0d added dot count for fake work delay 2014-10-26 08:07:52 -04:00
Pilwon Huh
371fc3b64d Improved, fixed bug, and cleaned up code for Go. 2014-08-18 21:29:50 -04:00
umisama
479c04c685 optimization 2014-01-07 19:48:49 +09:00
Michael Klishin
5e3bc31b66 Port tutorial 2 to Go 2013-10-18 00:02:23 +04:00