How to Get Started with GoLang as a Java Developer

Few simple steps to get started with GO.

Ruby Valappil
CodeX

--

Photo by Chinmay Bhattar on Unsplash

For quite some time, I have wanted to learn GO. The programs that I used to read, appeared to be simple enough to understand.

As Java developers, we are quite used to lengthy syntaxes. We don’t forget the “;” and our file name and public classes have the same name. We also take care of the visibility and access modifiers even for a simple Hello World program.

I just started learning GO and find it much relatable to Java in terms of the package and import declaration and the method /function syntax. With no classes to define and semicolons to add, I find GO much quicker to develop, at least for a simple application like “Hello World”.

Let’s try to implement a simple Hello World program in GO using a text editor and a Code Editor.

Step 1: First things first, let’s download and install Go on our local machine. Installation steps for all the different OS’s are given in the official guide at https://go.dev/doc/install.

I have installed the below-given version of golang, (use go version command to check that)

go version go1.17.7 darwin/amd64

By default, go would be installed at the below path,

--

--