I will install the go language development environment on the development machine of Mac OS X.
Go Language Runtime package: http://code.google.com/p/go/downloads/list
Here I choose to install go1.0.3.darwin-amd64.pkg
Click Install on Mac, and the running package is automatically installed in/usr/local/go, so that you can run the go command on the command terminal.
Here, I install the go editor to my xcode application.ProgramBecause my xcode is installed above 4.x
In/usr/local/go/MISC, you can see many editor versions. Here, find the xcode Directory, which is 4, and there is a go4xcode. Sh
Enter:
Sudo sh
./Go4xcode. Sh
You may report the following errors:
Xcrun: Error: cocould not stat active xcode path '/volumes/xcode/Xcode44-DP7.app/contents/developer'. (no such file or directory)
You can see this solution: http://stackoverflow.com/questions/11456918/change-xcrun-developer-path
Use the xcode-SELECT command.
The Go runtime package is installed on Mac by default. The goroot environment variable is not added. You must add a directory named/usr/local/go as the goroot, and then execute go4xcode. sh.