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
Go is also one of the Top 3 languages associated with the highest salaries globally.
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 !")
}
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 π
How to Code in Go (Tutorial Series)
DigitalOcean for DigitalOcean γ» Dec 30 '19
The Top 10 Places to Learn Go
Jeremy Morgan for Pluralsight γ» Nov 23 '19
Do you something else about Go? Do share that with the community in the comment section π¬
Top comments (5)
Enhance your hello world.
π· epsi.bitbucket.io/lambda/2020/11/2...
I will create another Go article tonight.
Waiting for it π
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...
and when you learn, get new stuff about/done with Go: twitter.com/golangch
Great π