package main import ( "fmt" "os" "strings" ) const usage = "usage: %s \n" func main() { if len(os.Args) < 3 { fmt.Fprintf(os.Stderr, usage, os.Args[0]) os.Exit(1) } joinName := os.Args[1] roomName := strings.Join(os.Args[2:], "_") fmt.Printf("chat add hipchat 1_%s@conf.btf.hipchat.com #%s\n", roomName, joinName) fmt.Printf("chan #%s set nick 'Stephen McQuay'\n", joinName) }