Click on the "Download Go" button, it will redirect to another page:
Click on the "Microsoft Windows" button, it will download an .msi file. After the download complete, run the file.
Click "Run":
Click "Next", "Next", and so on until installed:
After finished, click the start menu, type "computer", right click on "This PC", choose "Properties":
Then choose "Advanced system settings", "Environment Variables..", click "New" on "user variables" panel.
Set the "GOPATH" to "%HOMEDRIVE%%HOMEPATH%\Documents\go" or anywhere else for your main go directory, something like this:
Click "OK" on all dialog, next, just open a "Command Prompt" window and create required directory, type
:: go version go1.5 windows/amd64
mkdir Documents\go\src
:: creating a directory, only required for the first time
cd Documents\go\src
:: change directory to %GOPATH%\src
notepad hello.go
:: edit a new source code
Create a new source code and type something like this:
package main
import `fmt`
func main() {
fmt.Println( `Hello from Indonesia~ 1+1 =`, 1+1 )
}
Save, then go back to command prompt, type:
A line will printed, and that's how you could install and run a example go program.
For more resources on how to learn programming in Go, please refer to the documentation (that can be viewed offline also, search for "GoDocServer" on the start menu.
There are some recommended IDE:
- IntelliJ IDEA with go-lang-idea-plugins
- LiteIDE (no-cost)
- Atom with go-plus (no-cost)
- Sublime Text with GoSublime
- Wide (no-cost)
- ZeusEdit
- KomodoIDE
- Eclipse PDE with GoClipse (no-cost)
That's it~ Btw how many "go" words in this article?
No comments:
Post a Comment
THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?