Go (also known as Golang or Go language) is the language developed by Google. Go is an open-source, statically-typed compiled, and explicit programming language. According to Google Developers, Go is a dependable and efficient programming language. Go supports Concurrent programming. Go is also a multi-paradigm and object-oriented language. Go was inspired by Python and C languages. It is productive and simple as Python with the abilities of C.
Major Versions of Golang |
Initial Release Date |
---|---|
1–1.0.3 |
2012-03-28 |
1.1–1.1.2 |
2013-05-13 |
1.2–1.2.2 |
2013-12-01 |
1.3–1.3.3 |
2014-06-18 |
1.4–1.4.3 |
2014-12-10 |
1.5–1.5.4 |
2015-08-19 |
1.6–1.6.4 |
2016-02-17 |
1.7–1.7.6 |
2016-08-15 |
1.8–1.8.7 |
2017-02-16 |
1.9–1.9.7 |
2017-08-24 |
1.10–1.10.7 |
2018-02-16 |
1.11–1.11.6 |
2018-08-24 |
1.12.1 |
2019-02-25 |
1.13.1 |
2019-09-03 |
1.14 |
2020-02-25 |
Example :
package main
import "fmt"
func main() {
fmt.Println( "GO is GREAT!!!" )
fmt.Println( "GfG is GREAT!!!" )
} |
Output :
GO is GREAT!!! GfG is GREAT!!!
Interesting Facts About Golang:
- Robert Griesemer, Rob Pike, and Ken Thompson designed Go at Google in 2007.
- Google wants an alternative to C++ and solves the issues of software engineering, this gives rise to the development of the Go programming language.
- Go is supported on almost every Operating system like DragonFly BSD, FreeBSD, Linux, macOS, NetBSD, OpenBSD, Plan 9, Solaris, and Windows.
- Go provides 2 features that are capable of replacing Class inheritance. The first is embedding and the other is interfaces.
- Go has garbage collection which automatically performs memory management and permits deferred execution of functions.
- In Go language, we don’t need to put a comma (, ) at the end of statements like Python.
- There is a special Keyword in Go called ‘defer‘, which delays the execution of method or function until the nearby function returns.
- Go has a special built-in function known as ‘make‘, which is used to create slices, maps, and channels.
- If any variable or package is declared but not used then, the Go compiler will show an error.
- In Go, there is a new data type known as ‘slice‘, which has a more powerful interface to sequences as compared to Arrays.
- Sometimes we want to import packages only for their side effects, without exploiting their use like import _ “net/http/pprof”. For this purpose, the Go language is very useful.
- The ‘Goroutines‘ is a special function in Go, which runs concurrently with other functions or methods.
- In order to establish communication between goroutines. There exists a pipe known as ‘Channels‘.