move descriptor to the device, like config and interface.

Clear separation between descriptor stringers and value stringers for
the device and interface.
This commit is contained in:
Sebastian Zagrodzki
2017-04-29 00:59:13 +02:00
parent 59b493ec3c
commit ef59587a24
3 changed files with 40 additions and 49 deletions

View File

@@ -29,10 +29,10 @@ type InterfaceInfo struct {
AltSettings []InterfaceSetting
}
// String returns a human-readable descripton of the interface and it's
// alternate settings.
// String returns a human-readable descripton of the interface descriptor and
// it's alternate settings.
func (i InterfaceInfo) String() string {
return fmt.Sprintf("if=%d", i.Number)
return fmt.Sprintf("Interface %d (%d alternate settings)", i.Number, len(i.AltSettings))
}
// InterfaceSetting contains information about a USB interface with a particular