Use a map to store endpoint descriptors. Allows easy access to a

particular endpoint number.
This commit is contained in:
Sebastian Zagrodzki
2017-04-29 12:19:34 +02:00
parent 77c176cd4c
commit 6d81ca37d3
4 changed files with 79 additions and 64 deletions

View File

@@ -55,7 +55,7 @@ func TestEndpoint(t *testing.T) {
},
},
} {
epData.intf.Endpoints = []EndpointInfo{epData.ei}
epData.intf.Endpoints = map[int]EndpointInfo{epData.ei.Number: epData.ei}
for _, tc := range []struct {
desc string
buf []byte