Skip to content

Instantly share code, notes, and snippets.

@peterbourgon
Created May 24, 2012 11:08
Show Gist options
  • Save peterbourgon/b32b916136a742e66447 to your computer and use it in GitHub Desktop.
Save peterbourgon/b32b916136a742e66447 to your computer and use it in GitHub Desktop.
package main
import (
"github.com/peterbourgon/amqp-rpc"
"log"
"net"
)
func main() {
rwc, err := net.Dial("tcp", "localhost:5672")
if err != nil {
log.Fatalf("Dial: %s", err)
}
auth := &amqp.PlainAuth{
Username: "",
Password: "",
}
vhost := ""
_, err = amqp.NewConnection(rwc, auth, vhost)
if err != nil {
log.Fatalf("Connect: %s", err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment