$ cat > /usr/bin/go
#!/usr/bin/perl
my $name = $ARGV[0];
if ($name) {
$name =~ s/\.(go)?$//;
print `/usr/bin/6g $name.go`;
if (-f "$name.6") {
print `/usr/bin/6l $name.6`;
print `./6.out`;
}
}
There's no one by default, and you were clearly informed after the
installation process: "The compiler is 6g."
Finally (or firstly), the "Getting started" page explains it all:
http://golang.org/doc/install.html#writing
--
Andrew Shitov
______________________________________________________________________
an...@shitov.ru | http://shitov.ru
If you really need 'go', make it yourself:
$ cat > /usr/bin/go
#!/usr/bin/perl
my $name = $ARGV[0];
if ($name) {
$name =~ s/\.(go)?$//;
print `/usr/bin/6g $name.go`;
if (-f "$name.6") {
print `/usr/bin/6l $name.6`;
print `./6.out`;
}
}
There's no one by default, and you were clearly informed after the
installation process: "The compiler is 6g."
Incidentally, your GOPATH is set incorrectly. It should be set to some directory other than goroot, where you want to keep your go code.
See "go help gopath" for details.
Andrew