GO is created by google ,used for different tasks such as web development.
Golang has the following main features:
- suitable for developing service applications
- suitable for developing efficient and large scale programs
- suitable for modern computing environments such as cloud
- open-source
- GoLang has simple structure and syntax
- GO uses functions called goroutines which are like threads but are lightweight in terms of memory.
Some of the companies using GoLang
- YouTube
- Apple
- Dropbox
You can download it from the following link:
https://golang.org/
Once you open the above link you can select the option to download go:
In Go you issue commands as go “verb” for example:
go get
Folder is structured using the main workspace folder.
workspace folder consists of src folder and bin folder (executable)
In this example we are declaring a package called main which includes a function called main.It is important to note that function should be called main and package name should also be main.
The main function is automatically executed.
We are also importing a package called fmt.The fmtĀ packageĀ provides I/O functions.
package main import ( "fmt" ) func main() { fmt.Println("Hello World") }
Leave a Reply