Chromium Code Reviews

Side by Side Diff: go/src/infra/tools/auth/main.go

Issue 1153883002: go: infra/libs/* now live in luci-go. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: move the rest too Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « go/src/infra/monitoring/messages/alerts.go ('k') | go/src/infra/tools/cipd/apps/cipd/main.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* 5 /*
6 CLI wrapper for infra/libs/auth library. Can be used to manage cached 6 CLI wrapper for infra/libs/auth library. Can be used to manage cached
7 credentials. 7 credentials.
8 */ 8 */
9 package main 9 package main
10 10
11 import ( 11 import (
12 "os" 12 "os"
13 13
14 "github.com/luci/luci-go/common/auth"
15 "github.com/luci/luci-go/common/logging/gologger"
16
14 "github.com/maruel/subcommands" 17 "github.com/maruel/subcommands"
15
16 "infra/libs/auth"
17 "infra/libs/logging/gologger"
18 ) 18 )
19 19
20 func main() { 20 func main() {
21 opts := auth.Options{Logger: gologger.Get()} 21 opts := auth.Options{Logger: gologger.Get()}
22 application := &subcommands.DefaultApplication{ 22 application := &subcommands.DefaultApplication{
23 Name: "auth", 23 Name: "auth",
24 Title: "Chrome Infra Authentication tool", 24 Title: "Chrome Infra Authentication tool",
25 Commands: []*subcommands.Command{ 25 Commands: []*subcommands.Command{
26 subcommands.CmdHelp, 26 subcommands.CmdHelp,
27 auth.SubcommandInfo(opts, "info"), 27 auth.SubcommandInfo(opts, "info"),
28 auth.SubcommandLogin(opts, "login"), 28 auth.SubcommandLogin(opts, "login"),
29 auth.SubcommandLogout(opts, "logout"), 29 auth.SubcommandLogout(opts, "logout"),
30 }, 30 },
31 } 31 }
32 os.Exit(subcommands.Run(application, nil)) 32 os.Exit(subcommands.Run(application, nil))
33 } 33 }
OLDNEW
« no previous file with comments | « go/src/infra/monitoring/messages/alerts.go ('k') | go/src/infra/tools/cipd/apps/cipd/main.go » ('j') | no next file with comments »

Powered by Google App Engine