box-o-sand/gotime/amqpfun-runner/main.go

25 lines
346 B
Go
Raw Normal View History

package main
import (
2012-11-11 01:41:27 +00:00
"fmt"
"os"
)
import (
"github.com/meatballhat/box-o-sand/gotime/amqpfun"
)
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)
}
if os.Args[1] == "publish" {
amqpfun.Publish()
} else if os.Args[1] == "consume" {
amqpfun.Consume()
}
}