-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds a crosscompiling tool #2 #5
Conversation
can be called with go run tools/cross_compile.go it creates all binaries in a bin directory.
log.Fatal("Please call from main dir as 'go run tools/cross_compile.go'") | ||
} | ||
|
||
os.Mkdir("bin", 0755) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check error from Mkdir and also log.Fatal or panic
Thanks for the pointers. Should all be fixed now. |
@@ -0,0 +1,67 @@ | |||
// +build none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, wondered if you'll get caught ;) the +build directive requires an empty line immediately below, before a "regular godoc comment" can start, or it won't work correctly.
log.Fatal("Please call from main dir as 'go run tools/cross_compile.go'") | ||
} | ||
|
||
if err := os.Mkdir("bin", 0755); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be nicer this way:
err := os.Mkdir(...)
if err != nil && !os.IsExist(err) {
...
}
Thanks! |
can be called with
it creates all binaries in a bin directory.
This replaces the bash script from #4