More trivial connection crap
This commit is contained in:
parent
2f527a9d80
commit
97c9a95968
@ -2,7 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
import (
|
||||
@ -18,6 +18,23 @@ func main() {
|
||||
flag.Parse()
|
||||
|
||||
conn, err := amqp.Dial(*connUri)
|
||||
fmt.Println("conn=%+v", conn)
|
||||
fmt.Println("err=%+v", err)
|
||||
defer conn.Close()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal("err:", err)
|
||||
}
|
||||
|
||||
if conn != nil {
|
||||
log.Println("conn:", conn)
|
||||
}
|
||||
|
||||
channel, err := conn.Channel()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal("err:", err)
|
||||
}
|
||||
|
||||
if channel != nil {
|
||||
log.Println("channel:", channel)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user