Go-install

Go Lang Programming – An Introductory tutorial for beginners

  • Go (also referred to as Golang) is an open source programming language.
  • Golang is a programming language originally developed at Google in the year 2007 from Robert Griesemer, Rob Pike, and Ken Thompson.
  • It’s a statically-typed language that is compiled.
  • It supports concurrent programming, i.e. it enables running several processes concurrently.
  • This is accomplished by utilizing channels, goroutines, etc..
  • The “Go” has garbage collection that itself does the memory control and enables the deferred implementation of functions.
  • It’s a syntax very similar to that of C.
  • It gives garbage collection, type safety, dynamic-typing capacity, many innovative built-in types like variable length arrays, and key-value maps.
  • Additionally, it gives a rich standard library.
  • The Go programming language has been started in November 2009.
Characteristics of Go Programming
  • Compilation time is quick.
  • Go apps are easy, concise, and secure.
  • Support for Interfaces and Type embedding.
  • Generation of statically connected native binaries without external dependencies.
  • Go is concurrent. Go offers some excellent concurrency primitives and which makes it incredibly simple to implement a parallel system.
  • Simplicity and Consistency: Go is a comparatively straightforward language and has been created with a very slick approach. I found it effortless to pick up and begin with. The library contains most items like a webserver!
  • Go is object-oriented: Coming from different languages, it might look like Go isn’t object-oriented. It doesn’t provide the class keyword and has no support for inheritance. This may look odd. But, Go’s substitute for the class are structs. A struct might have any number of properties and methods defined on them.
  • Awesome compiler: Go’s compiler is super quick. It’s readily possible to compile a sizable Go program in a couple of seconds. The simple fact that the language syntax is really easy way that compilation is a lot faster.
  • The Pointers: I believed I would not need to use pointers following my college days, studying C. Go intends to deliver a modern equivalent of C in some regions and has attracted back pointers.
Further Reading:  What is a Range in Go Language?
How to install Go?

Follow the below steps to download and install Go on your computer.

You may download the binary of your Operating System from this link: https://golang.org/dl/

Go-install

After downloading the installer, run it, and follow the steps of installation.

Go-install-2

Once the installation is finished and Go is installed, you should ensure the installation was correct.

How to check Go is installed properly?

This is quite simple, just open the command prompt and type this command:

Go version

If it displays the version (as shown above), you‘re done!

A simple program to taste Go

Just write this small piece of code in test.go file:

package main
import (“fmt”)

func main() {
fmt.Println(“Welcome to Go Programming!”)
}

Save it and execute the file in the terminal.

For that, after opening the terminal, reach to the folder containing this file.

Then execute this command:

go run first.go

You should see the output message!

“Welcome to Go Programming!’