2012-11-10 23:47:32 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2012-11-11 01:41:27 +00:00
|
|
|
"fmt"
|
2012-11-10 23:47:32 +00:00
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
import (
|
2012-12-13 23:12:43 +00:00
|
|
|
"github.com/meatballhat/box-o-sand/gotime/amqpfun"
|
2012-11-10 23:47:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const USAGE = "Usage: amqpfun-runner (publish|consume)"
|
|
|
|
|
|
|
|
func main() {
|
2012-11-11 01:41:27 +00:00
|
|
|
if len(os.Args) < 2 {
|
|
|
|
fmt.Println(USAGE)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2012-11-10 23:47:32 +00:00
|
|
|
if os.Args[1] == "publish" {
|
|
|
|
amqpfun.Publish()
|
|
|
|
} else if os.Args[1] == "consume" {
|
|
|
|
amqpfun.Consume()
|
|
|
|
}
|
|
|
|
}
|