> On Aug 22, 2016, at 13:11 , Nate Finch <[email protected]> wrote: > > > // This line intentionally does not compile. This file will only be compiled > if > // you are compiling with a version of Go that is lower than the one we > support. > var requiredGoVersion = This_project_requires_Go_1_6 > > > If this file is compiled on a version of go that is 1.6 or higher, it'll get > excluded from the build, and all will be well. If you compile it on a version > of go that is lower than 1.6, you'll get an error like this: > ./version_canary.go:10: undefined: This_project_requires_Go_1_6 > This is (hopefully) a much clearer error message than something like this: > ../utils/tls.go:24: undefined: tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 > (which is the error message we used to get if we compiled with an earlier > version of go).
Thanks for this Nate. I got caught by this last week when setting up a CI machine and it took me a while to figure out. —Brad -- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
