hello world in go code example

Example 1: hello world in java

public static void main(String[] args){
  System.out.println("Hello World");
}

Example 2: Javascript how to run hello world

var msg = "hello world";
console.log(msg);

Example 3: hello world in go

// First Go program 
package main 
  
import "fmt"
  
// Main function 
func main() { 
  
    fmt.Println("!... Hello World ...!") 
}

Example 4: hello world in golang

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

Example 5: go hello world

package main

import "fmt"

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

Example 6: hello world golang

package main

import fmt

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

Tags:

Go Example