moar comments. Add a done callback to DefaultInterface return values.

This commit is contained in:
Sebastian Zagrodzki
2017-05-06 02:30:16 +02:00
parent c6b9a04e9f
commit 86c8e27edf
5 changed files with 26 additions and 8 deletions

View File

@@ -110,11 +110,11 @@ func Example_simple() {
// Claim the default interface using a convenience function.
// The default interface is always #0 alt #0 in the currently active
// config.
intf, err := dev.DefaultInterface()
intf, done, err := dev.DefaultInterface()
if err != nil {
log.Fatalf("%s.DefaultInterface(): %v", dev, err)
}
defer intf.Close()
defer done()
// Open an OUT endpoint.
ep, err := intf.OutEndpoint(7)