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

Side by Side Diff: logdog/client/cli/subcommandList.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 5 months 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/subcommandLatest.go ('k') | logdog/client/cli/subcommandQuery.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 cli 5 package cli
6 6
7 import ( 7 import (
8 "bufio" 8 "bufio"
9 "fmt" 9 "fmt"
10 "os" 10 "os"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 if len(args) == 0 { 54 if len(args) == 0 {
55 args = []string{""} 55 args = []string{""}
56 } 56 }
57 57
58 bio := bufio.NewWriter(os.Stdout) 58 bio := bufio.NewWriter(os.Stdout)
59 defer bio.Flush() 59 defer bio.Flush()
60 60
61 coord, err := a.coordinatorClient("") 61 coord, err := a.coordinatorClient("")
62 if err != nil { 62 if err != nil {
63 » » errors.Log(a, errors.Annotate(err).Reason("could not create Coor dinator client").Err()) 63 » » errors.Log(a, errors.Annotate(err, "could not create Coordinator client").Err())
64 return 1 64 return 1
65 } 65 }
66 66
67 for _, arg := range args { 67 for _, arg := range args {
68 arg = strings.TrimSpace(arg) 68 arg = strings.TrimSpace(arg)
69 69
70 var ( 70 var (
71 project cfgtypes.ProjectName 71 project cfgtypes.ProjectName
72 pathBase string 72 pathBase string
73 unified bool 73 unified bool
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 parts = append(parts, "archived") 147 parts = append(parts, "archived")
148 } 148 }
149 149
150 if s.State.Purged { 150 if s.State.Purged {
151 parts = append(parts, "purged") 151 parts = append(parts, "purged")
152 } 152 }
153 } 153 }
154 154
155 return strings.Join(parts, " ") 155 return strings.Join(parts, " ")
156 } 156 }
OLDNEW
« no previous file with comments | « logdog/client/cli/subcommandLatest.go ('k') | logdog/client/cli/subcommandQuery.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698