| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "flag" | 8 "flag" |
| 9 "os" | 9 "os" |
| 10 "os/signal" | 10 "os/signal" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Application: cli.Application{ | 53 Application: cli.Application{ |
| 54 Name: os.Args[0], | 54 Name: os.Args[0], |
| 55 Title: "LUCI Deployment Tool", | 55 Title: "LUCI Deployment Tool", |
| 56 Context: func(context.Context) context.Context { return
c }, | 56 Context: func(context.Context) context.Context { return
c }, |
| 57 Commands: []*subcommands.Command{ | 57 Commands: []*subcommands.Command{ |
| 58 subcommands.CmdHelp, | 58 subcommands.CmdHelp, |
| 59 &cmdCheckout, | 59 &cmdCheckout, |
| 60 &cmdDeploy, | 60 &cmdDeploy, |
| 61 &cmdManage, | 61 &cmdManage, |
| 62 | 62 |
| 63 » » » » authcli.SubcommandLogin(authOptions, "auth-login
"), | 63 » » » » authcli.SubcommandLogin(authOptions, "auth-login
", false), |
| 64 » » » » authcli.SubcommandLogout(authOptions, "auth-logo
ut"), | 64 » » » » authcli.SubcommandLogout(authOptions, "auth-logo
ut", false), |
| 65 » » » » authcli.SubcommandInfo(authOptions, "auth-info")
, | 65 » » » » authcli.SubcommandInfo(authOptions, "auth-info",
false), |
| 66 }, | 66 }, |
| 67 }, | 67 }, |
| 68 } | 68 } |
| 69 logFlags := log.Config{ | 69 logFlags := log.Config{ |
| 70 Level: log.Warning, | 70 Level: log.Warning, |
| 71 } | 71 } |
| 72 | 72 |
| 73 var fs flag.FlagSet | 73 var fs flag.FlagSet |
| 74 logFlags.AddFlags(&fs) | 74 logFlags.AddFlags(&fs) |
| 75 a.authFlags.Register(&fs, authOptions) | 75 a.authFlags.Register(&fs, authOptions) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return 1 | 111 return 1 |
| 112 } | 112 } |
| 113 | 113 |
| 114 // Run our subcommand (and parse subcommand flags). | 114 // Run our subcommand (and parse subcommand flags). |
| 115 return subcommands.Run(&a, fs.Args()) | 115 return subcommands.Run(&a, fs.Args()) |
| 116 } | 116 } |
| 117 | 117 |
| 118 func main() { | 118 func main() { |
| 119 os.Exit(mainImpl(os.Args[1:])) | 119 os.Exit(mainImpl(os.Args[1:])) |
| 120 } | 120 } |
| OLD | NEW |