OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |