bugst / go-serial

A cross-platform serial library for go-lang.
BSD 3-Clause "New" or "Revised" License
622 stars 191 forks source link

mksyscall question #25

Closed albenik closed 7 years ago

albenik commented 7 years ago

Why do you using local mksyscall_windows.go instead of $GOROOT one?

For example look to https://github.com/golang/sys/blob/master/windows/registry/mksyscall.go: //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go

cmaglie commented 7 years ago

Hi @albenik,

no particular reason, just I didn't thought about using $GOROOT, it looks like a nice way to remove the extras folder. I'm wondering if this works on windows too? I know that windows use %VAR% syntax instead of $VAR, but probably this is not a problem under cygwin or msys. Maybe you already tried it? If it works I'll definitely adopt this standard, of course if you want to make a pull request you're welcome :-)

albenik commented 7 years ago

$VAR syntax in go files are common for all os. Last fix https://github.com/bugst/go-serial/pull/34