File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -206,19 +206,20 @@ func (d *DiscoveryServer) list() {
206
206
d .outputError ("list" , "discovery already START_SYNCed, LIST not allowed" )
207
207
return
208
208
}
209
- if ports , err := d .impl .List (); err != nil {
209
+ ports , err := d .impl .List ()
210
+ if err != nil {
210
211
d .outputError ("list" , "LIST error: " + err .Error ())
211
212
return
212
- } else {
213
- type listOutputJSON struct {
214
- EventType string `json:"eventType"`
215
- Ports []* Port `json:"ports"`
216
- }
217
- d .output (& listOutputJSON {
218
- EventType : "list" ,
219
- Ports : ports ,
220
- })
221
213
}
214
+
215
+ type listOutputJSON struct {
216
+ EventType string `json:"eventType"`
217
+ Ports []* Port `json:"ports"`
218
+ }
219
+ d .output (& listOutputJSON {
220
+ EventType : "list" ,
221
+ Ports : ports ,
222
+ })
222
223
}
223
224
224
225
func (d * DiscoveryServer ) startSync () {
You can’t perform that action at this time.
0 commit comments