Commit Graph

7 Commits

Author SHA1 Message Date
Gabriele Santomaggio
e4fee05c96
Use PublishWithContext instad of Publish (#337)
Update the GO tutorials with PublishWithContext instead of Publish

Publish is deprecated.

As context, I used:  `context.WithTimeout(context.Background(), 5*time.Second)`
update the Golang Version to 1.7

Signed-off-by: Gabriele Santomaggio G.santomaggio@gmail.com
2022-09-05 11:34:35 +02:00
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
99f02f8271 Added Tutorial 6 code for Go. 2014-08-18 21:29:22 -04:00