From 22ff844a3d904d1a464c903e851b7b8c0702437e Mon Sep 17 00:00:00 2001 From: Sebastian Zagrodzki Date: Wed, 26 Apr 2017 22:24:46 +0200 Subject: [PATCH] s/DeviceSpeed/Speed/ --- usb/constants.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/usb/constants.go b/usb/constants.go index 4ff0ef2..23a7792 100644 --- a/usb/constants.go +++ b/usb/constants.go @@ -224,28 +224,28 @@ func (rt RequestType) String() string { return requestTypeDescription[rt] } -// DeviceSpeed identifies the speed of the device. -type DeviceSpeed int +// Speed identifies the speed of the device. +type Speed int // Device speeds as defined in the USB spec. const ( - DeviceSpeedUnknown DeviceSpeed = C.LIBUSB_SPEED_UNKNOWN - DeviceSpeedLow DeviceSpeed = C.LIBUSB_SPEED_LOW - DeviceSpeedFull DeviceSpeed = C.LIBUSB_SPEED_FULL - DeviceSpeedHigh DeviceSpeed = C.LIBUSB_SPEED_HIGH - DeviceSpeedSuper DeviceSpeed = C.LIBUSB_SPEED_SUPER + SpeedUnknown Speed = C.LIBUSB_SPEED_UNKNOWN + SpeedLow Speed = C.LIBUSB_SPEED_LOW + SpeedFull Speed = C.LIBUSB_SPEED_FULL + SpeedHigh Speed = C.LIBUSB_SPEED_HIGH + SpeedSuper Speed = C.LIBUSB_SPEED_SUPER ) -var deviceSpeedDescription = map[DeviceSpeed]string{ - DeviceSpeedUnknown: "unknown", - DeviceSpeedLow: "low", - DeviceSpeedFull: "full", - DeviceSpeedHigh: "high", - DeviceSpeedSuper: "super", +var deviceSpeedDescription = map[Speed]string{ + SpeedUnknown: "unknown", + SpeedLow: "low", + SpeedFull: "full", + SpeedHigh: "high", + SpeedSuper: "super", } // String returns a human-readable name of the device speed. -func (s DeviceSpeed) String() string { +func (s Speed) String() string { return deviceSpeedDescription[s] }