package
0.0.0-20200526015148-b343531734ec
Repository: https://github.com/fakorede/learning-golang.git
Documentation: pkg.go.dev

# README

Hello World

A basic hello world program in the GO programming lang.

Explanation

package main - Each source file begins with a package declaration. Here package main states which package the file belongs to.

import: The import keyword is used to import reusable pieces of code from other packages to use in our program.

import "fmt" - This line imports the fmt package which contains functions for printing formatted output and scanning input. Println is one of those basic functions. It prints one or more values, seperated by spaces, with a newline character at the end so that the values appear as a single line of input.

func main - This is where execution of the program begins. Whatever main does is what the program does.

func is a function declaration. A function declaration consists of the keyword func, the name of the fucntion, a parameter list(empty for main), the body of the function and the statement that defines what it does(enclosed in braces).

Run Program

$ go run main.go

Links to the Published Article

https://medium.com/@abiolafakorede/the-classic-hello-world-program-in-go-dd302b5325d7

https://dev.to/fakorede/the-classic-hello-world-program-in-go-d6b

https://fabcodes.hashnode.dev/the-classic-hello-world-program-in-go-ck8syp9cm00380fs12jyrolnh