Sitemap

Go programming language

2 min readApr 17, 2022

Go (also known as Golang) is a general purpose, multi-paradigm programming language created by three engineers at Google. Go was publicly announced in 2009 and version 1.0 was released in 2012, from then on, it was maintained and released by open-source community.

Go is created to make programming compilation process faster. Moreover, it aims to be a static, high performance, easy-to-learn, easy-to-adapt language. Go’s icon is a gopher as shown below:

Go ‘s icon as of 2022, credit: internet

Nowadays, Go is quite popular among developers, especially with DevOps community. According to Stack Overflow Developer Survey 2021, Go ranks 9th in list of highest paying programming language.

Press enter or click to view image in full size

Top highest paying programming language as of 2021, credit: Stack Overflow

Here are some famous projects that are written in Go:

  • Docker
  • Kubernetes
  • CockroachDB
  • InfluxDB

Companies that use Go in production:

  • Google
  • Uber
  • Dropbox
  • Twitch

Go has a rich set of standard libraries and more concise syntax than other programming language, making it ideal to handle large code base easier. Here is idiomatic Hello World program written in Go.

package main

import "fmt"
func main() {

fmt.Println("Hello World")

}

You can build a HTTP server without using any 3rd party libraries.

package main

import (

Get Nguyễn Tường’s stories in your inbox

Join Medium for free to get updates from this writer.

"log"

"net/http"

)

func main() {

mux := http.NewServeMux()

mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {

w.Write([]byte("Hello World\n"))

})
err := http.ListenAndServe(":5000", mux)

log.Fatalln(err)

}

Save this snippet to a main.go file and store somewhere on your machine. After that, navigate to the folder containing the file, open a terminal and run:

$ go run main.go

Open another terminal and run

$ curl localhost:5000

Then you should see the message Hello World sent back.

All in all,

Pros of Go:

  • Easy to learn, static language
  • Blazingly fast compiler
  • Concise syntax
  • High performance

Cons of Go:

  • Not a system language
  • Still need garbage collector

References

https://vi.wikipedia.org/wiki/Go_(ng%C3%B4n_ng%E1%BB%AF_l%E1%BA%ADp_tr%C3%ACnh)