github.com/koron/hk@v0.0.0-20150303213137-b8aeaa3ab34c/url.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 ) 7 8 var cmdURL = &Command{ 9 Run: runURL, 10 Usage: "url", 11 NeedsApp: true, 12 Category: "app", 13 Short: "show app url" + extra, 14 Long: `Prints the web URL for the app.`, 15 } 16 17 func runURL(cmd *Command, args []string) { 18 if len(args) != 0 { 19 cmd.PrintUsage() 20 os.Exit(2) 21 } 22 app, err := client.AppInfo(mustApp()) 23 must(err) 24 fmt.Println(app.WebURL) 25 }