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() {
206206 d .outputError ("list" , "discovery already START_SYNCed, LIST not allowed" )
207207 return
208208 }
209- if ports , err := d .impl .List (); err != nil {
209+ ports , err := d .impl .List ()
210+ if err != nil {
210211 d .outputError ("list" , "LIST error: " + err .Error ())
211212 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- })
221213 }
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+ })
222223}
223224
224225func (d * DiscoveryServer ) startSync () {
You can’t perform that action at this time.
0 commit comments