Warn about incorrect -goarch values

This commit is contained in:
Jakob Borg 2014-08-25 14:29:07 +02:00
parent fce73f6f17
commit faf519ab1b

View File

@ -55,6 +55,16 @@ func main() {
flag.BoolVar(&noupgrade, "no-upgrade", false, "Disable upgrade functionality")
flag.Parse()
switch goarch {
case "386", "amd64", "armv5", "armv6", "armv7":
break
case "arm":
log.Println("Invalid goarch \"arm\". Use one of \"armv5\", \"armv6\", \"armv7\".")
log.Fatalln("Note that producing a correct \"armv5\" binary requires a rebuilt stdlib.")
default:
log.Printf("Unknown goarch %q; proceed with caution!", goarch)
}
checkRequiredGoVersion()
if check() != nil {