| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. | 1 // Copyright 2015 The LUCI Authors. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 a := application{ | 163 a := application{ |
| 164 Application: cli.Application{ | 164 Application: cli.Application{ |
| 165 Name: "logdog", | 165 Name: "logdog", |
| 166 Title: "LogDog log data access CLI", | 166 Title: "LogDog log data access CLI", |
| 167 Context: func(context.Context) context.Context { return
ctx }, | 167 Context: func(context.Context) context.Context { return
ctx }, |
| 168 | 168 |
| 169 Commands: []*subcommands.Command{ | 169 Commands: []*subcommands.Command{ |
| 170 subcommands.CmdHelp, | 170 subcommands.CmdHelp, |
| 171 newCatCommand(), | 171 newCatCommand(), |
| 172 newQueryCommand(), | 172 newQueryCommand(), |
| 173 newListCommand(), | |
| 174 newLatestCommand(), | 173 newLatestCommand(), |
| 175 authcli.SubcommandLogin(authOptions, "auth-login
", false), | 174 authcli.SubcommandLogin(authOptions, "auth-login
", false), |
| 176 authcli.SubcommandLogout(authOptions, "auth-logo
ut", false), | 175 authcli.SubcommandLogout(authOptions, "auth-logo
ut", false), |
| 177 authcli.SubcommandInfo(authOptions, "auth-info",
false), | 176 authcli.SubcommandInfo(authOptions, "auth-info",
false), |
| 178 }, | 177 }, |
| 179 }, | 178 }, |
| 180 p: params, | 179 p: params, |
| 181 authFlags: authcli.Flags{}, | 180 authFlags: authcli.Flags{}, |
| 182 } | 181 } |
| 183 loggingConfig := log.Config{ | 182 loggingConfig := log.Config{ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 228 } |
| 230 | 229 |
| 231 if a.httpClient, err = auth.NewAuthenticator(ctx, auth.OptionalLogin, au
thOpts).Client(); err != nil { | 230 if a.httpClient, err = auth.NewAuthenticator(ctx, auth.OptionalLogin, au
thOpts).Client(); err != nil { |
| 232 log.Errorf(log.SetError(ctx, err), "Failed to create authenticat
ed client.") | 231 log.Errorf(log.SetError(ctx, err), "Failed to create authenticat
ed client.") |
| 233 return 1 | 232 return 1 |
| 234 } | 233 } |
| 235 | 234 |
| 236 a.Context = ctx | 235 a.Context = ctx |
| 237 return subcommands.Run(&a, flags.Args()) | 236 return subcommands.Run(&a, flags.Args()) |
| 238 } | 237 } |
| OLD | NEW |