Hello World
Now, first add the package main in your program:
package main
After adding main package import “fmt” package in your program:
import "fmt"
Now write the code in the main function to print hello world in Go language:
func main() {
fmt.Println("Hello World!")
}