Blog

Hello World with Golang

Nov 1, 2020 | 1 minute read
Share this article:

Series: learning

Tags: code, golang

Hello world is first stepping stone while learning any new computer language. Writing hello world in go was very exciting for me as I tried my hand for the first time in systems programming language

GopherInWonderland

Code block:

package main

import "fmt"

func main() {
    fmt.Println("hello world")
}

 

  1. First line of program is always package declaration
  2. Import go modules/packages to do basic readily available things like printing and scanning, make http requests
  3. func main() every program’s entry point

As easy as it looks to me Golang felt like the best gateway to systems programming