main.go in a way that it won't call in Linux / macOS?
Example:
func main() {
callWindowsFunctionInFromWindowsBuildConstraint()
doOtherStuff()
}
Update: I just created two files with two different build constraints but I'm looking for cleaner way with only window specific code file
Runtime.GOOS
That's why I use but even if I call Windows only function inside if Runtime.GOOS == "windows" {} it will fail to compile on other platforms due to that call
Обсуждают сегодня