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

Side by Side Diff: logdog/client/cmd/logdog_butler/streamserver.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
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 "flag" 8 "flag"
9 "fmt" 9 "fmt"
10 "strings" 10 "strings"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Common implementations. 77 // Common implementations.
78 switch typ { 78 switch typ {
79 case "tcp4": 79 case "tcp4":
80 return streamserver.NewTCP4Server(ctx, spec) 80 return streamserver.NewTCP4Server(ctx, spec)
81 81
82 case "tcp6": 82 case "tcp6":
83 return streamserver.NewTCP6Server(ctx, spec) 83 return streamserver.NewTCP6Server(ctx, spec)
84 84
85 default: 85 default:
86 » » return nil, errors.Reason("unknown stream server type: %(type)q" ). 86 » » return nil, errors.Reason("unknown stream server type: %q", typ) .Err()
87 » » » D("type", typ).
88 » » » Err()
89 } 87 }
90 } 88 }
OLDNEW
« no previous file with comments | « logdog/client/cmd/logdog_butler/output_logdog.go ('k') | logdog/client/cmd/logdog_butler/subcommand_run.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698