From ab6b612d1b53c95f440c4d6325f0f75d171ae1b3 Mon Sep 17 00:00:00 2001 From: Sebastian Zagrodzki Date: Sun, 9 Apr 2017 00:18:54 +0200 Subject: [PATCH] String of the endpoint should use EndpointInfo, not the default mapping from InterfaceInfo. --- usb/endpoint.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usb/endpoint.go b/usb/endpoint.go index 0827b6f..65262d9 100644 --- a/usb/endpoint.go +++ b/usb/endpoint.go @@ -30,6 +30,10 @@ type Endpoint struct { writeTimeout time.Duration } +func (e *Endpoint) String() string { + return e.Info.String() +} + func (e *Endpoint) Read(buf []byte) (int, error) { if e.Info.Direction != EndpointDirectionIn { return 0, fmt.Errorf("usb: read: not an IN endpoint")