DEV Community

Cover image for Go in 2 minutes
Hardik Chopra
Hardik Chopra

Posted on

Go in 2 minutes

Golang or Go was developed at Google as an open-source programming language and is one of the most trending programming languages among developers. Used by Google, Netflix, Twitter, and millions of users let's take a look at it.

What is Go?

Golang is a procedural and statically typed programming language. The goal was to create a language, loosely based on the syntax of C. It can be used in place of Python, Node.js, or PHP in the backend.

Go is not a free-form language, its conventions specify many formatting details, including how indentation and spaces are to be used. The language requires that none of its declared variables or imported libraries are unused, and all return statements are compulsory.


Why Go?

  • Go is a general-purpose language so it can be used for almost anything.
  • Mostly for scalable and efficient (web) services.
  • Another area is cloud applications. Google has high hopes for it becoming the defacto cloud language

Some features of Go

  • One defining feature of Go is concurrency, which means that multiple processes can be executed at the same time, which makes Go an efficient language.

  • It’s compilation time is very fast.

  • It supports the patterns which adapt to the surrounding environment similar to dynamic languages.

  • It supports the interfaces and embedded types.

  • It doesn’t require any external dependencies for the production of the statically linked native binaries.


Statistics

Here are some stats from Stack Overflow 2020 Developer Survey.

From last year, Go has jumped from 10th position to 5th position, making it in the list of Top 5 most loved programming language

  • Alt Text

Go is also one of the Top 3 languages associated with the highest salaries globally.

  • Alt Text

Bonus πŸ”₯

So up to this point, we have seen and understand what is Go and why to use go, now let's see how to write Go. It is a beginner's guide so we will just write code for everyone's favorite, Hello World!

INPUT

package main

import "fmt"

func main() {
    fmt.Println("Hello World !")
}
Enter fullscreen mode Exit fullscreen mode

OUTPUT

Hello World !


If you got to learn something new and useful show some love by giving this post a ❀️

If you have read so far, save this post and share it with your programming buddies πŸ˜ƒ


Resources πŸ‘‘


Do you something else about Go? Do share that with the community in the comment section πŸ’¬

Top comments (5)

Collapse
 
epsi profile image
E.R. Nurwijayadi • Edited

Enhance your hello world.

πŸ•· epsi.bitbucket.io/lambda/2020/11/2...

Go Playing with Records

I will create another Go article tonight.

Collapse
 
hardikchopra profile image
Hardik Chopra

Waiting for it πŸ˜„

Collapse
 
epsi profile image
E.R. Nurwijayadi • Edited

Passing Data Between Channel in Goroutines

Done

πŸ•· epsi.bitbucket.io/lambda/2020/11/2...
πŸ•· epsi.bitbucket.io/lambda/2020/11/2...
πŸ•· epsi.bitbucket.io/lambda/2020/12/2...

Go: Passing Data Between Channel in Goroutines

Collapse
 
golangch profile image
Stefan Wuthrich

and when you learn, get new stuff about/done with Go: twitter.com/golangch

Collapse
 
hardikchopra profile image
Hardik Chopra

Great πŸ˜‡