rename Setups to AltSettings

This commit is contained in:
Sebastian Zagrodzki
2017-04-09 20:45:35 +02:00
parent 8364724ca4
commit aaef575b06
11 changed files with 50 additions and 74 deletions

View File

@@ -15,8 +15,7 @@
package usb
// To enable internal debugging:
// -ldflags "-X github.com/kylelemons/gousb/usb.debugInternal true"
// To enable internal debugging, set the GOUSB_DEBUG environment variable.
import (
"io"
@@ -26,11 +25,12 @@ import (
)
var debug *log.Logger
var debugInternal string
const debugEnvVarName = "GOUSB_DEBUG"
func init() {
var out io.Writer = ioutil.Discard
if debugInternal != "" {
if os.Getenv(debugEnvVarName) != "" {
out = os.Stderr
}
debug = log.New(out, "usb", log.LstdFlags|log.Lshortfile)