Commit Graph

9 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
Joel Shapiro
2606c692d5
fix spelling in go tutorials 2017-02-05 20:49:14 -05:00
Hiroaki Nakamura
b877dbd708 Remove reduncant panic after log.Fatalf
Also run gofmt to format code
2016-07-01 00:15:03 +00: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
fc0dc7f6e4 Refactor error handling 2013-10-17 22:36:03 +04:00
Michael Klishin
f4cd7a7b39 Port tutorial 1 to Go 2013-10-17 01:09:33 +04:00