//go:generate moved out of OS specific go file

To avoid cross platform go generate issue
Look at https://github.com/golang/go/issues/16368
This commit is contained in:
Veniamin Albaev
2017-01-24 11:29:30 +03:00
parent ff9cf2b84b
commit 378aafb2f7
2 changed files with 2 additions and 2 deletions

View File

@@ -6,6 +6,8 @@
package serial // import "go.bug.st/serial.v1" package serial // import "go.bug.st/serial.v1"
//go:generate go run extras/mksyscall_windows.go -output syscall_windows.go serial_windows.go
// Port is the interface for a serial Port // Port is the interface for a serial Port
type Port interface { type Port interface {
// SetMode sets all parameters of the serial port // SetMode sets all parameters of the serial port

View File

@@ -23,8 +23,6 @@ type windowsPort struct {
handle syscall.Handle handle syscall.Handle
} }
//go:generate go run extras/mksyscall_windows.go -output syscall_windows.go serial_windows.go
//sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, value *uint16, valueLen *uint32) (regerrno error) = advapi32.RegEnumValueW //sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, value *uint16, valueLen *uint32) (regerrno error) = advapi32.RegEnumValueW
func nativeGetPortsList() ([]string, error) { func nativeGetPortsList() ([]string, error) {