GOÓïÑÔ°²×°£º£º
Ê×ÏÈÔÚ.bash_profileÏÂÌí¼ÓÈçÏ´úÂë
GOROOT=$HOME/go
GOARCH=amd64 Èç¹ûÊÇ386µÄ»úÆ÷µÄ»°¾Í°Ñamd64¸Ä³É386
GOOS=linux
export GOROOT GOARCH GOOS
×¢Ò⣬ÕâÀïµÄ$HOMEµ±È»ÊÇÄãµÄÖ÷Ŀ¼£¬µ«²¢²»ÐèÒªÊÖ¶¯½¨Á¢goÎļþ¼Ð£¬Èç¹û½¨Á¢ÁË£¬ÔòÎñ±Ø±£Ö¤Îļþ¼ÐΪ¿Õ£¡
Æä´Î£¬¿´¿´ÏµÍ³ÀïÓÐûÓÐhgÕâ¸öÃüÁÈç¹ûûÓУ¬ÒÔrootÉí·ÝÔËÐÐ
yum install mercurial
×Ðϸ¼ì²éÄãµÄ»·¾³ÖÐÁгö¡£ £¨Äú½«ÐèÒªÆô¶¯Ò»¸öеı仯Íâ¿Ç»òÖն˴°¿Ú²ÅÄÜÉúЧ¡££©
$ env | grep '^GO'
ÔÚÄãµÄ$HOMEÏÂн¨¸öbin»òÕßGOBIN µÄÎļþ¼Ð
°²×°CÓïÑÔ¹¤¾ßµÈ
yum install bison gcc libc6-dev ed gawk make
ÕâÒ»²½¾ÍÒªÏÂÔØGOÁË
hg clone -r release https://go.googlecode.com/hg/ $GOROOT
È»ºó½øÈëµ½
$ cd $GOROOT/src (ÍøÉÏдµÄÊÇGOROOT ÆäʵÎÒµÄÊÇhgÎļþ¼Ð ¿ÉÄܺÍÉÏÃ潨bin »òGOBIN ÓÐ¹Ø°É ÎÒ½¨µÄÊÇbin£©
$ ./all.bash
µÈ±àÒëºÃÁ˾ͻáÏÔʾÏÂÃæÕâÑù
--- cd ../test
N known bugs; 0 unexpected bugs ÎÒµÄNÊÇ3
vim ¸ßÁÁÏÔʾ
°Ñ GOROOT/mis/vim£¨»òÕßÊÇhg/mis/vim)ϵÄftdetect Îļþ¸´ÖƵ½ÄãµÄÖ÷Ŀ¼µÄ.vimÏ °ÑsyntaxÀïµÄËùÓÐ.vim ¸´ÖƵ½Ö÷Ŀ¼µÄ .vim/syntax¼´¿É Èç¹û.vimrcÀïûÓÐ syntax on µÄ»°¾Í¼ÓÉÏ°É¡£
ÏÂÃæд¸öhelloworld
vi hello.go
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
$ 6g hello.go ÕâÊÇamd64±àÒëÓÃ6g 386µÄ°Ñ¸Ä³É8¾Í¿ÉÒÔÁË
$ 6l hello.6
$ ./6.out
hello, world
ŪÍêÁË£¬¿´ÔÚÎÒÕâôÐÒ¿àµÄ·ÝÉ϶¥ÎÒÏ°ɣ¡£¡£¡
sauntor ÓÚ 2010-07-17 21:14:58·¢±í:
¹È¸èµÄ¶«Î÷ÍæµÄ²»ÊǺֻܶ࣬ÊÇÓùýGoogleDesktop£¬²»¹ý¸ÐÇéÉÏ»¹ÊÇÖ§³Öһϡ¡
ÍõÖÐÔÆ ÓÚ 2010-07-17 19:05:11·¢±í:
¶¥
shenhao0129 ÓÚ 2010-07-17 09:45:53·¢±í:
ûÌý˵¹ý
rotvnx ÓÚ 2010-07-17 09:41:56·¢±í:
ºÝ¶¥Â¥Ö÷
ÂÌÉ«Ê¥¹â ÓÚ 2010-07-17 08:42:49·¢±í:
¿´ÔÚÄãÕâôÐÒ¿àµÄ·ÝÉ϶¥ÄãÏ°ɣ¡£¡£¡