Introduction

It will cover the following things:

What is GoLang?

History of GoLang

Features of GoLang

Sample Code

Here is a simple Go program that prints "Hello, World!" to the console:

package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
​​​​​​​}

This program is made up of three parts:

  1. The package main line specifies that this is the main package, which means that it can be compiled and run as an executable program.
  2. The import "fmt" line brings in the fmt package, which provides functions for formatting and printing output.
  3. The func main() block defines the entry point for the program. It contains a single call to fmt.Println, which prints the string "Hello, World!" to the console.

To run this program, you can use the Go command-line tool:

  1. Save the program to a file named "hello.go".
  2. Open a terminal and navigate to the directory where you saved the file.
  3. Run the command go run hello.go.

This will compile and run the program, and you should see the output "Hello, World!" printed on the console.

In this article, we talked about GoLang, its history, benefits, and sample code, see you in the next series of articles.

Happy learning!