19 '''Verify that golang is properly installed. If not, exit with an error.'''
21 print >> sys.stderr, msg
25 go_exe = subprocess.check_output([WHICH,
'go'])
26 except (subprocess.CalledProcessError, OSError):
29 _fail(
'Unable to find Golang installation; see '
30 'https://golang.org/doc/install')
31 if not os.environ.get(
'GOPATH'):
32 _fail(
'GOPATH environment variable is not set; is Golang properly '
34 go_bin = os.path.join(os.environ[
'GOPATH'],
'bin')
35 for entry
in os.environ.get(
'PATH',
'').split(os.pathsep):
39 _fail(
'%s not in PATH; is Golang properly installed?' % go_bin)