-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dummy Go packages for vendoring of C files (#17)
- Loading branch information
1 parent
4ea2095
commit 4c5740d
Showing
9 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// +build dummy | ||
|
||
// This file is part of a workaround for `go mod vendor` which won't vendor | ||
// C files if there's no Go file in the same directory. | ||
// This would prevent the hidapi/hidapi/hidapi.h file to be vendored. | ||
// | ||
// This Go file imports the c directory where there is another dummy.go file which | ||
// is the second part of this workaround. | ||
// | ||
// These two files combined make it so `go mod vendor` behaves correctly. | ||
// | ||
// See this issue for reference: https://github.com/golang/go/issues/26366 | ||
|
||
package main | ||
|
||
import ( | ||
_ "github.com/karalabe/usb/hidapi" | ||
_ "github.com/karalabe/usb/hidapi/hidapi" | ||
_ "github.com/karalabe/usb/hidapi/libusb" | ||
_ "github.com/karalabe/usb/hidapi/mac" | ||
_ "github.com/karalabe/usb/hidapi/windows" | ||
_ "github.com/karalabe/usb/libusb" | ||
_ "github.com/karalabe/usb/libusb/libusb" | ||
_ "github.com/karalabe/usb/libusb/libusb/os" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package hidapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package hidapi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package libusb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package mac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package libusb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package libusb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// +build dummy | ||
|
||
// Package c contains only a C file. | ||
// | ||
// This Go file is part of a workaround for `go mod vendor`. | ||
// Please see the file dummy.go at the root of the module for more information. | ||
package os |