Windows Go
Windows Go - In the following tutorial I will show how to install and configure your Windows Go lang development environment
What is Go Programming Language?
“Go is a compiled, garbage-collected, concurrent programming language developed by Google Inc.” from http://en.wikipedia.org/wiki/Go_(programming_language) " Go is an open source programming environment that makes it easy to build simple, reliable, and efficient software." from http://golang.org/ “Go is an open source project with a BSD-style license.” from http://golang.org/doc/install
Go Compiler
There are two official Go compiler toolchains: the gc Go compiler and the gccgo compiler that is part of the GNU C Compiler (GCC). I’ll start with Go Compiler but until the end of this article I’ll add more info about gcc compiler.
Download the Go tools
Goto Go project’s downloads page and download the version according to your system (x86/64) and start the installation

Go with the installation defaults (Directory is: C:\Go) as the Go binary distributions assume they will be installed there. The installer should put the c:\Go\bin directory in your PATH environment variable. If you need to install to another location, you need to update your PATH environment variable.

You may need to restart any open command prompts for the change to take effect.
Note that this article is using the experimental MSI installer that configures your installation automatically. If you have problems, You can also use the zip archive option that requires you to set some environment variables. For experts you can also try installing from source.
Test your installation
Insert the following to a file named ‘hello.go’:
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
Then run it with the go tool on command:
\> go run hello.go
hello, world
If you see the “hello, world” message then your Go Programming Language installation is working.
Eclipse plugin
Prerequisites:
- Eclipse 3.6 or later (http://www.eclipse.org/)
- Java 1.6 or later (http://www.java.com/)
- Go development tools and libraries installed on target machine (http://golang.org/doc/install.html)
Eclipse
Eclipse is a decent IDE that you can use in development of your Golang code.
Download the Eclipse Standart version of eclipse (32Bit or 64Bit):
Java
Goto Java website and download latest version.

Goclipse
In your Eclipse goto Help > Install New Software…

In the dialog that appears, enter the update site URL into the Work with text box:
http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/
Click on the Add… button.
2. Leave the Name text box empty (the name will be retrieved from the update site). Click OK.
3. Back in the Install dialog, you should see the center box filled with the category: Go Plug-in for Eclipse. Check the box next to it.
4. Click Next.
5. Read the license agreements and then select I accept the terms of the license agreements. Click Finish.
6. Restart Eclipse.
You’ve GoClipse plugin for Eclipse installed.
Check here for more information about the goclipse plugin.
Create Eclipse Go Project
Click on File > New > Project…

Select Go Project from the tree. Click Next.

9. Enter the name of the project into the Project name text field. Click Finish.
The Go perspective will open and the new project will be visible from the Project Explorer View. See GettingStarted for more information on the new project and development tips.
Create new file:

and choose Command Source File.

Copy the Hello, World! Example
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello, world.\n")
}
and run:

Invalid Go language settings. Please adjust on the Go preferences page.
You’ve installed the Eclipse plugin before the Go Compiler? goto Windows > Preferences and then to the Go menu. Set the GOROOT to the installed directory of your Go Compiler (C:\Go by default). The Go Tools will be filled-in automatically.

If it doesn’t work, try creating a new project and test it again. It should solve the project.
What’s next
Read this What’s next section.
Go calling C
Installing mingw
In this tutorial, I won’t cover the manual installation of mingw. We’ll install mingw using the graphical Inteface for windows.
- Download mingw-get-inst-20120426 (or better, Download the latest installer from sourceforge) and run the installer…

- you can press the ’next’ button until the end. if you want, you can choose to download repositories in the 3rd stage.
Installing gcc
The gcc compiler for windows require gcc only if you plan to use cgo (creation of Go packages that call C code). As this procedure is more complex and not needed for beginners, I won’t cover this topic and we’ll continue installing Go without gcc.
That’s it, you have installed Windows Go !
