Use go:generate to create syscall_windows.go

This dramatically improves maintainability of generated files.

This will be eventually implemented on other generated files as well.
This commit is contained in:
Cristian Maglie
2016-10-13 21:52:13 +02:00
parent 50993cc77b
commit b93c8f2fea
4 changed files with 879 additions and 4 deletions

View File

@@ -22,6 +22,8 @@ type windowsPort struct {
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
func nativeGetPortsList() ([]string, error) {