1、安装go语言msi安装包
设置环境变量GOPATH=GOPATH=D:\Go\
下载地址:http://code.google.com/p/go/downloads/detail?name=go1.2.windows-386.msi&can=2&q=
2、安装GIT1.90安装包
下载地址:http://code.google.com/p/msysgit/downloads/detail?name=Git-1.9.0-preview20140217.exe&can=2&q=
3、运行git bash,需要需要安装redis
go get "github.com/garyburd/redigo/redis"
4、编写HelloWorld.go
// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test that we can do page 1 of the C book.
package main
func main() {
print("hello, world\n")
}
5、点开始/运行输入CMD,运行go build HelloWorld.go即可编译