| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 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 "log" | 8 "log" |
| 9 "os" | 9 "os" |
| 10 | 10 |
| 11 "github.com/luci/luci-go/client/authcli" | 11 "github.com/luci/luci-go/client/authcli" |
| 12 "github.com/luci/luci-go/client/internal/common" | 12 "github.com/luci/luci-go/client/internal/common" |
| 13 "github.com/luci/luci-go/common/auth" | 13 "github.com/luci/luci-go/common/auth" |
| 14 "github.com/maruel/subcommands" | 14 "github.com/maruel/subcommands" |
| 15 ) | 15 ) |
| 16 | 16 |
| 17 // version must be updated whenever functional change (behavior, arguments, | 17 // version must be updated whenever functional change (behavior, arguments, |
| 18 // supported commands) is done. | 18 // supported commands) is done. |
| 19 const version = "0.3" | 19 const version = "0.3" |
| 20 | 20 |
| 21 var application = &subcommands.DefaultApplication{ | 21 var application = &subcommands.DefaultApplication{ |
| 22 Name: "isolate", | 22 Name: "isolate", |
| 23 Title: "isolate.py but faster", | 23 Title: "isolate.py but faster", |
| 24 // Keep in alphabetical order of their name. | 24 // Keep in alphabetical order of their name. |
| 25 Commands: []*subcommands.Command{ | 25 Commands: []*subcommands.Command{ |
| 26 cmdArchive, | 26 cmdArchive, |
| 27 cmdBatchArchive, | 27 cmdBatchArchive, |
| 28 cmdCheck, | 28 cmdCheck, |
| 29 subcommands.CmdHelp, | 29 subcommands.CmdHelp, |
| 30 » » authcli.SubcommandInfo(auth.Options{}, "whoami"), | 30 » » authcli.SubcommandInfo(auth.Options{}, "whoami", false), |
| 31 » » authcli.SubcommandLogin(auth.Options{}, "login"), | 31 » » authcli.SubcommandLogin(auth.Options{}, "login", false), |
| 32 » » authcli.SubcommandLogout(auth.Options{}, "logout"), | 32 » » authcli.SubcommandLogout(auth.Options{}, "logout", false), |
| 33 common.CmdVersion(version), | 33 common.CmdVersion(version), |
| 34 }, | 34 }, |
| 35 } | 35 } |
| 36 | 36 |
| 37 func main() { | 37 func main() { |
| 38 log.SetFlags(log.Lmicroseconds) | 38 log.SetFlags(log.Lmicroseconds) |
| 39 os.Exit(subcommands.Run(application, nil)) | 39 os.Exit(subcommands.Run(application, nil)) |
| 40 } | 40 } |
| OLD | NEW |