Step 1:- Download Go from
https://golang.org/
https://golang.org/
Step 2:- Download the latest version of JAVA/J2EE Eclipse Version. We had taken Neon from Eclipse Site
https://eclipse.org/downloads/
https://www.eclipse.org/downloads/download.php?file=/oomph/epp/neon/R/eclipse-inst-win64.exe
Step 3:- Set GOROOT Variable in your system till the bin path i.e We had installed Go in C Drive so set GOROOT=C:\Go
Step 4:- Install goEclipse Plugin from belwo link. It will take time to configure Go Plugin.
https://marketplace.eclipse.org/content/goclipse
Step 5:- Create New Go Project
Step 6:- Make sure to create a package inside src folder of Created Go Project by Eclipse
Step 7:- Click on the project and press ALT+ENTER and following below screen will be displayed

Step 8:- For GO Installation set the path where bin folder of Go project is set
Step 9 :- Uncheck check box :- Use same variable as the GOPATH environment variable
Step 10:- Add your newly created Eclipse project by using add Folder button and click apply and ok.
Step 10:- Finally build the application by clicking on build as shown in the below image

Step 11:- After successful build we will see siddhu.exe created inside the bin folder of our Eclipse project.
i.e. siddhu name is taken from the folder name in which we keep the *.go files.
i.e. siddhu name is taken from the folder name in which we keep the *.go files.
Step 12:- Two way to execute
A- Either from command prompt. Navigate till bin folder of eclispe project and execute exe as shown in belwo figure

b- Execute it using Eclipse i.e. right click on file in eclipse and select Rus As->Go Application

No comments:
Post a Comment