Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: logdog/client/cmd/logdog_butler/main.go

Issue 2503583002: Hide advanced commands from cipd client help. (Closed)
Patch Set: address comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « logdog/client/cli/main.go ('k') | logdog/common/storage/archive/logdog_archive_test/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 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 "bytes" 8 "bytes"
9 "flag" 9 "flag"
10 "fmt" 10 "fmt"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 Application: cli.Application{ 230 Application: cli.Application{
231 Name: "butler", 231 Name: "butler",
232 Title: "Log collection and streaming bootstrap.", 232 Title: "Log collection and streaming bootstrap.",
233 Context: func(context.Context) context.Context { return ctx }, 233 Context: func(context.Context) context.Context { return ctx },
234 Commands: []*subcommands.Command{ 234 Commands: []*subcommands.Command{
235 subcommands.CmdHelp, 235 subcommands.CmdHelp,
236 subcommandRun, 236 subcommandRun,
237 subcommandStream, 237 subcommandStream,
238 subcommandServe, 238 subcommandServe,
239 239
240 » » » » authcli.SubcommandLogin(authOptions, "auth-login "), 240 » » » » authcli.SubcommandLogin(authOptions, "auth-login ", false),
241 » » » » authcli.SubcommandLogout(authOptions, "auth-logo ut"), 241 » » » » authcli.SubcommandLogout(authOptions, "auth-logo ut", false),
242 » » » » authcli.SubcommandInfo(authOptions, "auth-info") , 242 » » » » authcli.SubcommandInfo(authOptions, "auth-info", false),
243 }, 243 },
244 }, 244 },
245 } 245 }
246 // Install logging configuration flags. 246 // Install logging configuration flags.
247 flags := flag.NewFlagSet("flags", flag.ExitOnError) 247 flags := flag.NewFlagSet("flags", flag.ExitOnError)
248 logConfig := log.Config{ 248 logConfig := log.Config{
249 Level: log.Info, 249 Level: log.Info,
250 } 250 }
251 logConfig.AddFlags(flags) 251 logConfig.AddFlags(flags)
252 a.addFlags(flags) 252 a.addFlags(flags)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 paniccatcher.Do(func() { 334 paniccatcher.Do(func() {
335 rc = mainImpl(ctx, os.Args[1:]) 335 rc = mainImpl(ctx, os.Args[1:])
336 }, func(p *paniccatcher.Panic) { 336 }, func(p *paniccatcher.Panic) {
337 log.Fields{ 337 log.Fields{
338 "panic.error": p.Reason, 338 "panic.error": p.Reason,
339 }.Errorf(ctx, "Panic caught in main:\n%s", p.Stack) 339 }.Errorf(ctx, "Panic caught in main:\n%s", p.Stack)
340 rc = runtimeErrorReturnCode 340 rc = runtimeErrorReturnCode
341 }) 341 })
342 } 342 }
OLDNEW
« no previous file with comments | « logdog/client/cli/main.go ('k') | logdog/common/storage/archive/logdog_archive_test/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698